From f1d71429587552afad6f78c8e74d05c33bbba5ae Mon Sep 17 00:00:00 2001 From: TheodoreChu <22967798+TheodoreChu@users.noreply.github.com> Date: Sun, 6 Dec 2020 23:25:15 -0800 Subject: [PATCH] feat: menu with copy text, copy HTMl, uncheck boxes --- build/asset-manifest.json | 20 +-- build/icons/ic-menu-variant.svg | 3 + build/index.html | 2 +- build/static/css/main.1852c0ce.chunk.css | 2 + build/static/css/main.1852c0ce.chunk.css.map | 1 + build/static/css/main.52f19b8d.chunk.css | 2 - build/static/css/main.52f19b8d.chunk.css.map | 1 - build/static/js/4.b613b891.chunk.js | 3 - build/static/js/4.ea980b31.chunk.js | 3 + ...SE.txt => 4.ea980b31.chunk.js.LICENSE.txt} | 0 ...1.chunk.js.map => 4.ea980b31.chunk.js.map} | 2 +- build/static/js/main.02a84f27.chunk.js | 2 + build/static/js/main.02a84f27.chunk.js.map | 1 + build/static/js/main.a922e0bb.chunk.js | 2 - build/static/js/main.a922e0bb.chunk.js.map | 1 - public/icons/ic-menu-variant.svg | 3 + src/components/AppendEditor.tsx | 57 +++++++-- src/components/Menu.tsx | 116 ++++++++++++++++++ src/components/ViewNote.tsx | 1 + src/stylesheets/main.scss | 63 ++++++++-- src/stylesheets/print.scss | 3 +- 21 files changed, 243 insertions(+), 45 deletions(-) create mode 100644 build/icons/ic-menu-variant.svg create mode 100644 build/static/css/main.1852c0ce.chunk.css create mode 100644 build/static/css/main.1852c0ce.chunk.css.map delete mode 100644 build/static/css/main.52f19b8d.chunk.css delete mode 100644 build/static/css/main.52f19b8d.chunk.css.map delete mode 100644 build/static/js/4.b613b891.chunk.js create mode 100644 build/static/js/4.ea980b31.chunk.js rename build/static/js/{4.b613b891.chunk.js.LICENSE.txt => 4.ea980b31.chunk.js.LICENSE.txt} (100%) rename build/static/js/{4.b613b891.chunk.js.map => 4.ea980b31.chunk.js.map} (66%) create mode 100644 build/static/js/main.02a84f27.chunk.js create mode 100644 build/static/js/main.02a84f27.chunk.js.map delete mode 100644 build/static/js/main.a922e0bb.chunk.js delete mode 100644 build/static/js/main.a922e0bb.chunk.js.map create mode 100644 public/icons/ic-menu-variant.svg create mode 100644 src/components/Menu.tsx diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 1fab3cc7..d0250f98 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -4,14 +4,14 @@ "static/js/0.96650d91.chunk.js.map": "./static/js/0.96650d91.chunk.js.map", "static/js/1.78ca9d6c.chunk.js": "./static/js/1.78ca9d6c.chunk.js", "static/js/1.78ca9d6c.chunk.js.map": "./static/js/1.78ca9d6c.chunk.js.map", - "main.css": "./static/css/main.52f19b8d.chunk.css", - "main.js": "./static/js/main.a922e0bb.chunk.js", - "main.js.map": "./static/js/main.a922e0bb.chunk.js.map", + "main.css": "./static/css/main.1852c0ce.chunk.css", + "main.js": "./static/js/main.02a84f27.chunk.js", + "main.js.map": "./static/js/main.02a84f27.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.25e89614.js", "runtime-main.js.map": "./static/js/runtime-main.25e89614.js.map", "static/css/4.7c0a8645.chunk.css": "./static/css/4.7c0a8645.chunk.css", - "static/js/4.b613b891.chunk.js": "./static/js/4.b613b891.chunk.js", - "static/js/4.b613b891.chunk.js.map": "./static/js/4.b613b891.chunk.js.map", + "static/js/4.ea980b31.chunk.js": "./static/js/4.ea980b31.chunk.js", + "static/js/4.ea980b31.chunk.js.map": "./static/js/4.ea980b31.chunk.js.map", "static/js/5.09338a01.chunk.js": "./static/js/5.09338a01.chunk.js", "static/js/5.09338a01.chunk.js.map": "./static/js/5.09338a01.chunk.js.map", "static/js/6.ca7d77f3.chunk.js": "./static/js/6.ca7d77f3.chunk.js", @@ -152,16 +152,16 @@ "static/js/73.cbdec997.chunk.js.map": "./static/js/73.cbdec997.chunk.js.map", "index.html": "./index.html", "static/css/4.7c0a8645.chunk.css.map": "./static/css/4.7c0a8645.chunk.css.map", - "static/css/main.52f19b8d.chunk.css.map": "./static/css/main.52f19b8d.chunk.css.map", - "static/js/4.b613b891.chunk.js.LICENSE.txt": "./static/js/4.b613b891.chunk.js.LICENSE.txt", + "static/css/main.1852c0ce.chunk.css.map": "./static/css/main.1852c0ce.chunk.css.map", + "static/js/4.ea980b31.chunk.js.LICENSE.txt": "./static/js/4.ea980b31.chunk.js.LICENSE.txt", "static/js/65.393e0ac1.chunk.js.LICENSE.txt": "./static/js/65.393e0ac1.chunk.js.LICENSE.txt", "static/media/codicon.css": "./static/media/codicon.b3726f01.ttf" }, "entrypoints": [ "static/js/runtime-main.25e89614.js", "static/css/4.7c0a8645.chunk.css", - "static/js/4.b613b891.chunk.js", - "static/css/main.52f19b8d.chunk.css", - "static/js/main.a922e0bb.chunk.js" + "static/js/4.ea980b31.chunk.js", + "static/css/main.1852c0ce.chunk.css", + "static/js/main.02a84f27.chunk.js" ] } \ No newline at end of file diff --git a/build/icons/ic-menu-variant.svg b/build/icons/ic-menu-variant.svg new file mode 100644 index 00000000..36a0e40a --- /dev/null +++ b/build/icons/ic-menu-variant.svg @@ -0,0 +1,3 @@ + + + diff --git a/build/index.html b/build/index.html index 16d6a9cb..caa170a0 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -Append Editor
\ No newline at end of file +Append Editor
\ No newline at end of file diff --git a/build/static/css/main.1852c0ce.chunk.css b/build/static/css/main.1852c0ce.chunk.css new file mode 100644 index 00000000..47c37c70 --- /dev/null +++ b/build/static/css/main.1852c0ce.chunk.css @@ -0,0 +1,2 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--sn-stylekit-font-size-editor:16px;--sn-stylekit-monospace-font:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace}@media screen and (max-width:650px){:root{--sn-stylekit-font-size-editor:18px}h1{font-size:1.75em}}body,html{font-family:var(--sn-stylekit-sans-serif-font);height:100%;width:100%;margin:0;padding:0;font-size:var(--sn-stylekit-base-font-size);background-color:transparent}*{-webkit-tap-highlight-color:rgba(0,0,0,0)}button{font-family:var(--sn-stylekit-sans-serif-font);background-color:transparent}button:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component{display:flex;flex-direction:column;min-height:100vh}.sn-component .sk-panel.main{max-width:700px;width:100%;margin:10px 5px}@media screen and (max-width:725px){.sn-component .sk-panel.main{border-left:none;border-right:none;border-bottom:none;box-shadow:none;margin:0}}@media screen and (max-width:725px){.sn-component .sk-panel.main.appendix.otherEditor,.sn-component .sk-panel.main.edit.otherEditor{border-top:none}}.sn-component .sk-panel.main.appendix.monacoEditor,.sn-component .sk-panel.main.edit.monacoEditor{max-width:800px}.sn-component .sk-panel-content.view{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.view{padding:0!important}}.sn-component .sk-panel-content.edit{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.edit{padding-left:0!important;padding-right:0!important;padding-top:0!important}}.sn-component .sk-panel-content.edit.monacoEditor{overflow-x:hidden!important}.sn-component .sk-input.textarea{min-height:136px;padding:9px 10px;max-width:inherit;width:calc(100% - 22px);height:100%;resize:vertical;overflow-y:auto;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);line-height:1.7}.sn-component .sk-input.textarea:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component .sk-input.textarea.editnote{max-height:calc(100% - 32px)}.sn-component .sk-input.textarea.append{max-height:calc(100% - 22px)}.sn-component .sk-panel-row{padding-top:.5rem;padding-bottom:.5rem}.sn-component .sk-panel-row .sk-button-group.stretch{display:flex;justify-content:space-between;width:50%;margin-left:auto;margin-right:auto}#header{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color);display:flex;overflow:auto;padding:10px 0;width:100%}#header svg:after{content:"";background:var(--sn-stylekit-info-color);opacity:.1}#header .sk-button-group{max-width:700px;padding-left:2px;padding-right:2px;display:flex;margin-left:auto;margin-right:auto}#header .sk-button-group button{border-width:0;font-size:16px}#header .sk-button-group button .sk-label{font-weight:inherit}#header .sk-button-group .sk-button.off{opacity:.75}#header .sk-button-group .sk-button.divider{opacity:.25;cursor:unset;margin-right:0}#header .sk-button-group .sk-button.info.off{color:var(--sn-stylekit-info-color);background-color:transparent}#header .sk-button-group .sk-button.info.off:before{background-color:transparent}#header .sk-button-group .sk-button.info.off:before:hover,#header .sk-button-group .sk-button.info.off:hover{background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:450px){#header .sk-button-group #printButton{display:none}}#menu{background-color:var(--sn-stylekit-background-color);display:flex;flex-direction:column;height:calc(100% - 62px);border:1px solid var(--sn-stylekit-border-color);border-right-width:0;margin-bottom:20px;margin-right:0;margin-top:0;min-width:40%;position:absolute;right:0;z-index:2;text-align:center}#menu button,#menu p{color:var(--sn-stylekit-foreground-color);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);margin:10px 20px}#menu button{border-width:1px;padding:8px 12px;text-align:left}#menu .notification.visible{visibility:visible;opacity:1;transition:opacity .2s ease-in}#menu .notification.hidden{visibility:hidden;opacity:0;transition:visibility 0s .5s,opacity .5s ease-out}#content{background-color:var(--sn-stylekit-contrast-background-color);flex:auto;display:flex;justify-content:center}@media screen and (max-width:725px){#content{padding:0}}#appendix,#content,#menu,.DynamicEditor{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}#appendix a,#content a,#menu a,.DynamicEditor a{color:var(--sn-stylekit-info-color);text-decoration:none}#appendix a:hover,#content a:hover,#menu a:hover,.DynamicEditor a:hover{text-decoration:underline}#appendix blockquote,#content blockquote,#menu blockquote,.DynamicEditor blockquote{margin:0 0 16px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}#appendix hr,#content hr,#menu hr,.DynamicEditor hr{border:.5px solid var(--sn-stylekit-border-color)}#appendix img,#content img,#menu img,.DynamicEditor img{max-width:100%}#appendix table,#content table,#menu table,.DynamicEditor table{display:block;width:100%;overflow:auto;margin-top:0;margin-bottom:16px;border-spacing:0;border-collapse:collapse}#appendix table tr,#content table tr,#menu table tr,.DynamicEditor table tr{background-color:transparent;border-top:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table td,#appendix table th,#content table td,#content table th,#menu table td,#menu table th,.DynamicEditor table td,.DynamicEditor table th{padding:6px 13px;border:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table tr:nth-child(2n),#content table tr:nth-child(2n),#menu table tr:nth-child(2n),.DynamicEditor table tr:nth-child(2n){background-color:var(--sn-stylekit-contrast-background-color)}#appendix table tr:nth-child(2n) code,#appendix table tr:nth-child(2n) pre,#content table tr:nth-child(2n) code,#content table tr:nth-child(2n) pre,#menu table tr:nth-child(2n) code,#menu table tr:nth-child(2n) pre,.DynamicEditor table tr:nth-child(2n) code,.DynamicEditor table tr:nth-child(2n) pre{background-color:var(--sn-stylekit-background-color)}#appendix summary .link,#content summary .link,#menu summary .link,.DynamicEditor summary .link{display:inline;color:var(--sn-stylekit-info-color)}#appendix summary .link:hover,#content summary .link:hover,#menu summary .link:hover,.DynamicEditor summary .link:hover{text-decoration:underline}#appendix h1,#appendix h2,#appendix h3,#content h1,#content h2,#content h3,#menu h1,#menu h2,#menu h3,.DynamicEditor h1,.DynamicEditor h2,.DynamicEditor h3{line-height:normal}#appendDynamicEditor code,#appendDynamicEditor pre,#dynamicEditor code,#dynamicEditor pre,#errorBoundary code,#errorBoundary pre,#help code,#help pre,#intro code,#intro pre,#renderedNote code,#renderedNote pre,#settings code,#settings pre,.DynamicEditor code,.DynamicEditor pre,.rendered-note-section code,.rendered-note-section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}#appendDynamicEditor .hljs,#dynamicEditor .hljs,#errorBoundary .hljs,#help .hljs,#intro .hljs,#renderedNote .hljs,#settings .hljs,.DynamicEditor .hljs,.rendered-note-section .hljs{color:var(--sn-stylekit-contrast-foreground-color)}#appendDynamicEditor .hljs-tag,#dynamicEditor .hljs-tag,#errorBoundary .hljs-tag,#help .hljs-tag,#intro .hljs-tag,#renderedNote .hljs-tag,#settings .hljs-tag,.DynamicEditor .hljs-tag,.rendered-note-section .hljs-tag{color:var(--sn-stylekit-foreground-color)}#appendDynamicEditor code,#dynamicEditor code,#errorBoundary code,#help code,#intro code,#renderedNote code,#settings code,.DynamicEditor code,.rendered-note-section code{box-sizing:border-box;word-wrap:break-word;padding:.2em .4em;margin:0;font-size:85%;background-color:var(--sn-stylekit-contrast-background-color);border-radius:3px}#appendDynamicEditor pre,#dynamicEditor pre,#errorBoundary pre,#help pre,#intro pre,#renderedNote pre,#settings pre,.DynamicEditor pre,.rendered-note-section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-foreground-color);border-radius:3px;word-wrap:normal;margin-top:0;margin-bottom:16px}#appendDynamicEditor pre>code,#dynamicEditor pre>code,#errorBoundary pre>code,#help pre>code,#intro pre>code,#renderedNote pre>code,#settings pre>code,.DynamicEditor pre>code,.rendered-note-section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;background-color:transparent;border:0}#appendDynamicEditor pre code,#dynamicEditor pre code,#errorBoundary pre code,#help pre code,#intro pre code,#renderedNote pre code,#settings pre code,.DynamicEditor pre code,.rendered-note-section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;background-color:initial;border:0}#errorBoundary,#help,#intro,.rendered-note-section{padding:9px 10px;border:1px solid transparent;margin-left:auto;margin-right:auto;max-width:645.5px}.rendered-note-section{height:calc(100% - 20px)}#errorBoundary,#help,#intro,#renderedNote,.rendered-section{word-wrap:break-word;overflow-wrap:break-word;line-height:1.7}#errorBoundary>:first-child,#renderedNote>div>:first-child,.ProseMirror>:nth-child(2){margin-top:0}.sk-notification{overflow:visible!important;margin:10px 0 0!important;padding:21px 14px 21px 28px!important}.note-dialog{max-width:700px;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:200}#settings .sk-panel-section:last-child{margin-bottom:0}.sk-panel-section{padding-bottom:0}#content .note-dialog h1,.sk-panel.main.settings h1{margin:.2em 0}#content .note-dialog .title-section,.sk-panel.main.settings .title-section{padding-top:0}#content .note-dialog .text-and-undo-button,.sk-panel.main.settings .text-and-undo-button{display:flex}#content .note-dialog .text-and-undo-button .undo-button,#content .note-dialog .text-and-undo-button p,.sk-panel.main.settings .text-and-undo-button .undo-button,.sk-panel.main.settings .text-and-undo-button p{margin-top:0;margin-bottom:0;display:inline}#content .note-dialog button,.sk-panel.main.settings button{border-width:0;font-size:16px}@media screen and (max-width:650px){#content .note-dialog button,.sk-panel.main.settings button{font-size:17px}}#content .note-dialog button.toggle-button,.sk-panel.main.settings button.toggle-button{padding-left:0;display:flex}#content .note-dialog button .button-caption,#content .note-dialog button .chevron-button,.sk-panel.main.settings button .button-caption,.sk-panel.main.settings button .chevron-button{line-height:20px;margin-top:5px;margin-bottom:5px}#content .note-dialog button .button-caption,.sk-panel.main.settings button .button-caption{color:var(--sn-stylekit-foreground-color)}#content .note-dialog button .sk-label,.sk-panel.main.settings button .sk-label{font-weight:400!important}#content .note-dialog button:hover,#content .note-dialog input[type=checkbox i]:hover,.sk-panel.main.settings button:hover,.sk-panel.main.settings input[type=checkbox i]:hover{cursor:pointer}#content .note-dialog .sk-panel-header .sk-button.info,.sk-panel.main.settings .sk-panel-header .sk-button.info{color:var(--sn-stylekit-info-color);background-color:transparent}#content .note-dialog .sk-panel-header .sk-button.info:before,.sk-panel.main.settings .sk-panel-header .sk-button.info:before{background-color:transparent}#content .note-dialog .sk-panel-header .sk-button.info:hover,.sk-panel.main.settings .sk-panel-header .sk-button.info:hover{color:var(--sn-stylekit-info-contrast-color);background-color:var(--sn-stylekit-info-color)}#content .note-dialog .sk-panel-header .sk-button.info:hover a,.sk-panel.main.settings .sk-panel-header .sk-button.info:hover a{color:var(--sn-stylekit-info-contrast-color)}#content .note-dialog .sk-panel-header .sk-button.info:before:hover,.sk-panel.main.settings .sk-panel-header .sk-button.info:before:hover{background-color:var(--sn-stylekit-info-color)}#content .note-dialog .sk-panel-row.settings,.sk-panel.main.settings .sk-panel-row.settings{padding-top:.2rem}#content .note-dialog .sk-panel-row.settings input,#content .note-dialog .sk-panel-row.settings label,#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings label,.sk-panel.main.settings .sk-panel-row.settings select{cursor:pointer}#content .note-dialog .sk-panel-row.settings input,#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings select{font-size:16px;padding:.5rem;background-color:var(--sn-stylekit-contrast-background-color);border-color:var(--sn-stylekit-border-color);color:var(--sn-stylekit-foreground-color)}#content .note-dialog .sk-panel-row.settings input[type=checkbox],#content .note-dialog .sk-panel-row.settings input[type=text],.sk-panel.main.settings .sk-panel-row.settings input[type=checkbox],.sk-panel.main.settings .sk-panel-row.settings input[type=text]{min-width:250px}#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings select{min-width:267px}#content .note-dialog .sk-panel-row.settings .radio,.sk-panel.main.settings .sk-panel-row.settings .radio{margin-top:3px;margin-bottom:3px}#content .note-dialog .sk-panel-row.settings textarea,.sk-panel.main.settings .sk-panel-row.settings textarea{white-space:pre;overflow-x:auto;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}@media screen and (max-width:480px){#content .note-dialog .sk-panel-row.settings,.sk-panel.main.settings .sk-panel-row.settings{flex-direction:column!important;align-items:flex-start!important}#content .note-dialog .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings input{margin-top:1rem}}.note-overlay{position:fixed!important;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:100}#appendix{background-color:var(--sn-stylekit-contrast-background-color);display:block}#appendix .sk-button-group{display:flex;justify-content:space-between;width:50%;margin-left:auto;margin-right:auto}#appendix .sk-panel{margin-top:0;margin-left:auto;margin-right:auto}#appendix .checkBoxForm{position:absolute;font-size:13px;padding-left:25px}#appendix .checkBoxForm label{cursor:pointer}@media screen and (max-width:600px){#appendix .checkBoxForm{padding-left:10px}}@media screen and (max-width:500px){#appendix .checkBoxForm{padding-left:5px}}@media screen and (max-width:455px){#appendix .checkBoxForm label{font-size:12px}}@media screen and (max-width:426px){#appendix .checkBoxForm label{font-size:11px}}@media screen and (max-width:410px){#appendix .checkBoxForm label{font-size:10px}}@media screen and (max-width:388px){#appendix .checkBoxForm label{font-size:9px}}#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{border-width:0;font-size:14px}@media screen and (max-width:650px){#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:17px}}#appendix #appendTextButton .sk-label,#appendix #scrollToBottomButton .sk-label,#appendix #scrollToTopButton .sk-label{font-weight:inherit}#appendix #scrollToTopButton{position:fixed;right:25px;bottom:45px}@media screen and (max-width:725px){#appendix #scrollToTopButton{right:15px;bottom:5.2px}}#appendix #scrollToBottomButton{position:fixed;right:25px;bottom:10px}@media screen and (max-width:725px){#appendix #scrollToBottomButton{right:55px;bottom:5.2px}}.MonacoDiffEditorContainer,.MonacoEditorContainer{min-height:200px;width:calc(100% - 1.5px);max-width:inherit;max-height:inherit}.edit .MonacoDiffEditorContainer,.edit .MonacoEditorContainer{min-height:200px;height:calc(100% - 25px);margin-bottom:25px}#appendix .MonacoEditorContainer{height:400px}#content .CodeMirror{max-height:calc(100% - 1rem)}#appendix .CodeMirror{max-height:calc(100% - 2px)}.CodeMirror{font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);background:inherit;color:inherit;line-height:1.7;min-height:8.25em;border:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:725px){.CodeMirror{border-top:1px solid var(--sn-stylekit-border-color)}}.CodeMirror .CodeMirror-gutter,.CodeMirror .CodeMirror-gutters,.CodeMirror .CodeMirror-linenumber,.CodeMirror .CodeMirror-scroll,.CodeMirror .CodeMirror-sizer{background:inherit}.CodeMirror .CodeMirror-linenumber{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}.CodeMirror .cm-header.cm-header-1{font-size:2em}.CodeMirror .cm-header.cm-header-2{font-size:1.5em}.CodeMirror .cm-header.cm-header-3{font-size:1.17em}.CodeMirror .cm-header.cm-header-4{font-size:1em}.CodeMirror .cm-comment{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font);font-size:85%;margin:0;padding:.2em .4em}.CodeMirror .cm-comment.cm-link.CodeMirror-selectedtext,.CodeMirror .cm-comment.CodeMirror-selectedtext{background-color:unset}.CodeMirror .cm-attribute,.CodeMirror .cm-header{color:var(--sn-stylekit-success-color)}.CodeMirror .cm-string-2,.CodeMirror .cm-tag,.CodeMirror .cm-tag.cm-bracket,.CodeMirror .cm-variable,.CodeMirror .cm-variable-1,.CodeMirror .cm-variable-2,.CodeMirror .cm-variable-3{color:var(--sn-stylekit-foreground-color)}.CodeMirror .cm-string-2.CodeMirror-selectedtext,.CodeMirror .cm-tag.cm-bracket.CodeMirror-selectedtext,.CodeMirror .cm-tag.CodeMirror-selectedtext,.CodeMirror .cm-variable-1.CodeMirror-selectedtext,.CodeMirror .cm-variable-2.CodeMirror-selectedtext,.CodeMirror .cm-variable-3.CodeMirror-selectedtext,.CodeMirror .cm-variable.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror .cm-builtin,.CodeMirror .cm-string,.CodeMirror .cm-string.cm-url.cm-variable-2{color:var(--sn-stylekit-warning-color)}.CodeMirror .cm-error{color:var(--sn-stylekit-danger-color)}.CodeMirror .cm-link,.CodeMirror .cm-link.cm-variable-2{color:var(--sn-stylekit-info-color)}.CodeMirror .cm-quote{color:#6a737d}.cm-attribute.CodeMirror-selectedtext,.cm-builtin.CodeMirror-selectedtext,.cm-keyword.CodeMirror-selectedtext,.cm-link.CodeMirror-selectedtext,.cm-number.CodeMirror-selectedtext,.cm-string.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror-dialog{position:fixed;background:var(--sn-stylekit-background-color)}.CodeMirror-cursor{border-color:var(--sn-stylekit-info-color)}.CodeMirror-selected{background:var(--sn-stylekit-input-placeholder-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-focused .CodeMirror-selected{background:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-selectedtext{background:transparent;color:var(--sn-stylekit-info-contrast-color)}.DynamicEditor{padding:9px 30px 10px}.DynamicEditor div[class^=sc]{background-color:var(--sn-stylekit-background-color)}button.block-menu-trigger{display:none!important}@media screen and (min-width:725px){.DynamicEditor{padding:5px 20px 10px}}@media screen and (min-width:600px){.YouTube{min-height:315px;min-width:560px;margin:10px auto;display:block}}.ProseMirror{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color)}@media print{.printURL a[href]:after{content:" (" attr(href) ")"}.sn-component{outline:none}#appendix,#header,#menu{display:none}.sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix,.sk-panel.main.edit{display:none;background-color:var(--sn-stylekit-background-color)}.appendix,.content{background-color:var(--sn-stylekit-background-color)!important}#renderedNote pre code{white-space:pre-wrap;word-break:break-word}}.sk-panel.main.printModeOn{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view.printModeOn{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix.printModeOn,.sk-panel.main.edit.printModeOn{background-color:var(--sn-stylekit-background-color)}.appendix.printModeOn,.content.printModeOn{background-color:var(--sn-stylekit-background-color)!important}@media (prefers-color-scheme:dark){:root{--primary-bg-color:#292937;--secondary-bg-color:#313142;--editor-bg-color:#202020;--border-color:#13131a;--ui-text-color:#d8d8d8;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-neutral-color:#7c7c7c;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-desktop-titlebar-bg-color:var(--primary-bg-color);--sn-desktop-titlebar-border-color:var(--border-color);--sn-desktop-titlebar-ui-color:var(--ui-text-color);--sn-desktop-titlebar-ui-hover-color:var(--sn-stylekit-info-color);--sn-stylekit-shadow-color:#20202b;--sn-stylekit-background-color:#20202b;--sn-stylekit-border-color:var(--border-color);--sn-stylekit-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-background-color:var(--secondary-bg-color);--sn-stylekit-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-border-color:var(--border-color);--sn-stylekit-secondary-background-color:#292937;--sn-stylekit-secondary-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-border-color:var(--border-color);--sn-stylekit-secondary-contrast-background-color:#45445a;--sn-stylekit-secondary-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-contrast-border-color:var(--border-color);--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:var(--ui-text-color);--sn-stylekit-scrollbar-track-border-color:var(--border-color);--sn-stylekit-scrollbar-thumb-color:var(--sn-stylekit-info-color)}} +/*# sourceMappingURL=main.1852c0ce.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/main.1852c0ce.chunk.css.map b/build/static/css/main.1852c0ce.chunk.css.map new file mode 100644 index 00000000..f38ba3cc --- /dev/null +++ b/build/static/css/main.1852c0ce.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.scss","webpack://node_modules/highlight.js/scss/vs.scss","webpack://src/stylesheets/main.scss","webpack://src/stylesheets/codemirror.scss","webpack://src/stylesheets/dynamicEditor.scss","webpack://src/stylesheets/print.scss","webpack://src/stylesheets/dark.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CACnC,KAGC,yEACW,CCNb,MACE,aAAc,CACd,eAAgB,CAChB,YAAc,CACd,eAAiB,CACjB,UAAY,CACb,yCAKC,WAAc,CACf,qEAOC,UAAW,CACZ,0IAWC,aAAc,CACf,oEAMC,aAAc,CACf,aAGC,UAAc,CACf,WAGC,SAAW,CACZ,qCAKC,aAAc,CACf,eAIC,iBAAkB,CACnB,aAGC,eAAiB,CC5DnB,MACE,mCAA+B,CAC/B,0GAA6B,CAE9B,oCAGC,MACE,mCAA+B,CAChC,GAEC,gBAAiB,CAClB,CAGH,UAEE,8CAA+C,CAC/C,WAAY,CACZ,UAAW,CACX,QAAS,CACT,SAAU,CACV,2CAA4C,CAC5C,4BAA6B,CAC9B,EAIC,yCAA6C,CAC9C,OAGC,8CAA+C,CAC/C,4BAA6B,CAC9B,aAGC,6DAA8D,CAC/D,aAGC,yCAA0C,CAC1C,sCAAuC,CACvC,kBAAmB,CACnB,iBAAkB,CACnB,cAGC,YAAa,CACb,qBAAsB,CACtB,gBAAiB,CAHnB,6BAOI,eAAgB,CAChB,UAAW,CACX,eAAgB,CAEhB,oCAXJ,6BAYM,gBAAiB,CACjB,iBAAkB,CAClB,kBAAmB,CACnB,eAAgB,CAChB,QAAS,CAEZ,CAGC,oCArBJ,gGAsBM,eAAgB,CAEnB,CAxBH,kGA2BI,eAAgB,CA3BpB,qCAkCI,gCAA8B,CAE9B,oCApCJ,qCAsCM,mBAAuB,CAE1B,CAxCH,qCA4CI,gCAA8B,CAC9B,oCA7CJ,qCA+CM,wBAA4B,CAC5B,yBAA6B,CAC7B,uBAA2B,CAQ9B,CAzDH,kDAuDM,2BAA6B,CAvDnC,iCA4DI,gBAAiB,CACjB,gBAAiB,CACjB,iBAAkB,CAClB,uBAAwB,CACxB,WAAY,CACZ,eAAgB,CAChB,eAAgB,CAChB,8CAA+C,CAC/C,cAA8C,CAA9C,6CAA8C,CAC9C,eAAgB,CArEpB,uCA2EI,yCAA0C,CAC1C,sCAAuC,CACvC,kBAAmB,CACnB,iBAAkB,CA9EtB,0CAkFI,4BAA6B,CAlFjC,wCAsFI,4BAA6B,CAtFjC,4BA2FI,iBAAmB,CACnB,oBAAsB,CA5F1B,qDA+FM,YAAa,CACb,6BAA8B,CAC9B,SAAU,CACV,gBAAiB,CACjB,iBAAkB,CACnB,QAOH,oDAAqD,CACrD,yCAA0C,CAC1C,YAAa,CACb,aAAc,CACd,cAAe,CACf,UAAW,CARb,kBAWI,UAAW,CACX,wCAAyC,CACzC,UAAY,CAbhB,yBAiBI,eAAgB,CAChB,gBAAiB,CACjB,iBAAkB,CAClB,YAAa,CACb,gBAAiB,CACjB,iBAAkB,CAtBtB,gCA0BM,cAAiB,CACjB,cAAe,CA3BrB,0CA8BQ,mBAAoB,CA9B5B,wCAkCM,WAAa,CAlCnB,4CAqCM,WAAa,CACb,YAAa,CACb,cAAiB,CAvCvB,6CA0CM,mCAAoC,CACpC,4BAA6B,CA3CnC,oDA8CM,4BAA6B,CA9CnC,6GAuDM,6DAA8D,CAC/D,oCAxDL,sCA2DQ,YAAa,CACd,CAKP,MACE,oDAAqD,CACrD,YAAa,CACb,qBAAsB,CACtB,wBAAyB,CAEzB,gDAAuB,CAAvB,oBAAuB,CACvB,kBAAmB,CACnB,cAAiB,CACjB,YAAe,CACf,aAAc,CACd,iBAAkB,CAClB,OAAU,CACV,SAAU,CACV,iBAAkB,CAdpB,qBAkBI,yCAA0C,CAC1C,cAA8C,CAA9C,6CAA8C,CAC9C,gBAAiB,CApBrB,aAuBI,gBAAiB,CACjB,gBAAiB,CACjB,eAAgB,CAzBpB,4BA8BM,kBAAmB,CACnB,SAAU,CACV,8BAAiC,CAhCvC,2BAoCM,iBAAkB,CAClB,SAAU,CACV,iDAAuD,CACxD,SAKH,6DAA8D,CAC9D,SAAU,CACV,YAAa,CACb,sBAAuB,CAEvB,oCANF,SAOI,SAAU,CAEb,CAED,wCAIE,cAAA,CAAA,6CAA8C,CAJhD,gDAMI,mCAAoC,CACpC,oBAAqB,CAPzB,wEAWI,yBAA0B,CAX9B,oFAiBI,eAAmB,CACnB,aAAc,CACd,aAAc,CACd,+BAAiC,CApBrC,oDAwBI,iDAAmD,CAxBvD,wDA4BI,cAAe,CA5BnB,gEAgCI,aAAc,CACd,UAAW,CACX,aAAc,CACd,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,wBAAyB,CAtC7B,4EAyCM,4BAA6B,CAC7B,6DAA8D,CA1CpE,wJA+CM,gBAAiB,CACjB,yDAA0D,CAhDhE,oIAoDM,6DAEC,CAtDP,4SAyDQ,oDAAqD,CAzD7D,gGA+DM,cAAe,CACf,mCAAoC,CAhE1C,wHAmEM,yBAA0B,CAnEhC,4JA0EI,kBAAmB,CACpB,6UAeC,yFAAA,CAAA,6CAA8C,CAXlD,oLAcI,kDAAmD,CAdvD,wNAiBI,yCAA0C,CAjB9C,2KAqBI,qBAAsB,CACtB,oBAAqB,CACrB,iBAAoB,CACpB,QAAS,CACT,aAAc,CACd,6DAEC,CACD,iBAAkB,CA7BtB,kKAiCI,YAAa,CACb,aAAc,CACd,aAAc,CACd,gBAAiB,CACjB,6DAEC,CACD,yCAA0C,CAC1C,iBAAkB,CAClB,gBAAiB,CACjB,YAAa,CACb,kBAAmB,CA5CvB,+MAgDI,SAAU,CACV,QAAS,CACT,cAAe,CACf,iBAAkB,CAClB,eAAgB,CAChB,sBAAuB,CACvB,4BAA6B,CAC7B,QAAS,CAvDb,+MA2DI,cAAe,CACf,cAAe,CACf,SAAU,CACV,QAAS,CACT,gBAAiB,CACjB,mBAAoB,CACpB,gBAAiB,CACjB,4BAAyB,CAAzB,wBAAyB,CACzB,QAAS,CACV,mDAOD,gBAAiB,CAEjB,4BAAmB,CACnB,gBAAiB,CACjB,iBAAkB,CAClB,iBAAkB,CACnB,uBAGC,wBAAyB,CAC1B,4DAYC,oBAAqB,CACrB,wBAAyB,CACzB,eAAgB,CACjB,sFAKC,YAAe,CAChB,iBAIC,0BAA4B,CAC5B,yBAA6B,CAE7B,qCAAuC,CACxC,aAGC,eAAgB,CAChB,UAAW,CACX,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,8BAAgC,CAChC,WAAY,CACb,uCAGC,eAAkB,CACnB,kBAEC,gBAAmB,CACpB,oDAKG,aAAiB,CAHrB,4EAMI,aAAgB,CANpB,0FASI,YAAa,CATjB,kNAYM,YAAe,CACf,eAAkB,CAClB,cAAe,CAdrB,4DAkBI,cAAiB,CACjB,cAAe,CACf,oCApBJ,4DAqBM,cAAe,CAkBlB,CAvCH,wFAwBM,cAAiB,CACjB,YAAa,CAzBnB,wLA6BM,gBAAiB,CACjB,cAAe,CACf,iBAAkB,CA/BxB,4FAkCM,yCAA0C,CAlChD,gFAqCM,yBAA8B,CArCpC,gLA0CI,cAAe,CA1CnB,gHA+CM,mCAAoC,CACpC,4BAA6B,CAhDnC,8HAmDM,4BAA6B,CAnDnC,4HAsDM,4CAA6C,CAC7C,8CAA+C,CAvDrD,gIAyDQ,4CAA6C,CAzDrD,0IA6DM,8CAA+C,CA7DrD,4FAkEI,iBAAmB,CAlEvB,0TAsEM,cAAe,CAtErB,kNA0EM,cAAe,CACf,aAAe,CACf,6DAA8D,CAC9D,4CAA6C,CAC7C,yCAA0C,CA9EhD,oQAoFM,eAAgB,CApFtB,0GAuFM,eAAgB,CAvFtB,0GA0FM,cAAe,CACf,iBAAkB,CA3FxB,8GA+FM,eAAgB,CAChB,eAAgB,CAChB,yFAAA,CAAA,6CAA8C,CAC/C,oCAlGL,4FAqGM,+BAAiC,CACjC,gCAAkC,CAtGxC,wGAyGQ,eAAgB,CACjB,CAKP,cACE,wBAA0B,CAC1B,UAAW,CACX,WAAY,CACZ,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QAAS,CACT,WAAY,CACb,UAGC,6DAA8D,CAC9D,aAAc,CAFhB,2BAKI,YAAa,CACb,6BAA8B,CAC9B,SAAU,CACV,gBAAiB,CACjB,iBAAkB,CATtB,oBAYI,YAAa,CACb,gBAAiB,CACjB,iBAAkB,CAdtB,wBAkBI,iBAAkB,CAClB,cAAe,CAKf,iBAAkB,CAxBtB,8BAsBM,cAAe,CAChB,oCAvBL,wBA0BM,iBAAkB,CAyBrB,CAvBC,oCA5BJ,wBA6BM,gBAAiB,CAsBpB,CApBC,oCA/BJ,8BAiCQ,cAAe,CAChB,CAEH,oCApCJ,8BAsCQ,cAAe,CAChB,CAEH,oCAzCJ,8BA2CQ,cAAe,CAChB,CAEH,oCA9CJ,8BAgDQ,aAAc,CACf,CAjDP,yFAwDI,cAAiB,CACjB,cAAe,CACf,oCA1DJ,yFA2DM,cAAe,CAKlB,CAhEH,uHA8DM,mBAAoB,CA9D1B,6BAmEI,cAAe,CACf,UAAW,CACX,WAAY,CACZ,oCAtEJ,6BAuEM,UAAW,CACX,YAAa,CAEhB,CA1EH,gCA4EI,cAAe,CACf,UAAW,CACX,WAAY,CACZ,oCA/EJ,gCAgFM,UAAW,CACX,YAAa,CAEhB,CAGH,kDAEE,gBAAiB,CACjB,wBAAyB,CACzB,iBAAkB,CAClB,kBAAmB,CACpB,8DAIC,gBAAiB,CACjB,wBAAyB,CACzB,kBAAmB,CACpB,iCAGC,YAAa,CACd,qBCxsBC,4BAA6B,CAC9B,sBAGC,2BAA4B,CAC7B,YAIC,8CAA+C,CAC/C,cAA8C,CAA9C,6CAA8C,CAC9C,kBAAmB,CACnB,aAAc,CACd,eAAgB,CAChB,iBAAkB,CAClB,yDAA0D,CAC1D,6DAA8D,CAE9D,oCAXF,YAYI,oDAAqD,CAoExD,CAhFD,+JAmBI,kBAAmB,CAnBvB,mCAsBI,yFAAA,CAAA,6CAA8C,CAtBlD,mCAyBI,aAAc,CAzBlB,mCA4BI,eAAgB,CA5BpB,mCA+BI,gBAAiB,CA/BrB,mCAkCI,aAAc,CAlClB,wBAqCI,6DAA8D,CAC9D,kDAAmD,CACnD,yFAA8C,CAA9C,6CAA8C,CAC9C,aAAc,CACd,QAAS,CACT,iBAAoB,CA1CxB,wGA8CI,sBAAuB,CA9C3B,iDAkDI,sCAAuC,CAlD3C,sLA2DI,yCAA0C,CA3D9C,8VA6DM,4CAA6C,CAC7C,sBAAuB,CA9D7B,2FAoEI,sCAAuC,CApE3C,sBAuEI,qCAAsC,CAvE1C,wDA2EI,mCAAoC,CA3ExC,sBA8EI,aAAc,CACf,qNASC,4CAA6C,CAC7C,sBAAuB,CACxB,mBAGD,cAAe,CACf,8CAA+C,CAChD,mBAEC,0CAA2C,CAC5C,qBAEC,qDAAsD,CACtD,4CAA6C,CAC9C,yCAEC,wCAAyC,CACzC,4CAA6C,CAC9C,yBAEC,sBAAuB,CACvB,4CAA6C,CAC9C,eCrHC,qBAAsB,CADxB,8BAGI,oDAAqD,CACtD,0BAGD,sBAAwB,CACzB,oCAEC,eACE,qBAAsB,CACvB,CAEH,oCACE,SACE,gBAAiB,CACjB,eAAgB,CAChB,gBAAiB,CACjB,aAAc,CACf,CAGH,aACE,oDAAqD,CACrD,yCAA0C,CAC3C,aCzBC,wBAEI,2BAA4B,CAC7B,cAID,YAAa,CACd,wBAKC,YAAa,CACd,eAGC,8CAA+C,CAC/C,eAAgB,CACjB,oBAGC,cAAe,CACf,YAAe,CACf,eAAkB,CACnB,4CAIC,YAAa,CACb,oDAAqD,CACtD,mBAIC,8DAAgE,CACjE,uBAGC,oBAAqB,CACrB,qBAAsB,CACvB,CAGH,2BACE,8CAA+C,CAC/C,eAAgB,CACjB,gCAGC,cAAe,CACf,YAAe,CACf,eAAkB,CACnB,oEAIC,oDAAqD,CACtD,2CAIC,8DAAgE,CACjE,mCC5DC,MACE,0BAAmB,CACnB,4BAAqB,CACrB,yBAAkB,CAClB,sBAAe,CACf,uBAAgB,CAEhB,gCAAyB,CACzB,sCAAkC,CAElC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,kCAA2B,CAC3B,wCAAoC,CAEpC,sDAA+B,CAC/B,sDAAmC,CACnC,mDAA+B,CAC/B,kEAAqC,CAGrC,kCAA2B,CAE3B,sCAA+B,CAC/B,8CAA2B,CAC3B,mDAA+B,CAE/B,iEAAwC,CACxC,4DAAwC,CACxC,uDAAoC,CAEpC,gDAAyC,CACzC,6DAAyC,CACzC,wDAAqC,CAErC,yDAAkD,CAClD,sEAAkD,CAClD,iEAA8C,CAE9C,yEAAsC,CACtC,yEAAsC,CAEtC,uDAAmC,CAEnC,8DAA2C,CAC3C,iEAAoC,CACrC","file":"main.1852c0ce.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond \n\n*/\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: white;\n color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n color: #2b91af;\n}\n\n.hljs-doctag {\n color: #808080;\n}\n\n.hljs-attr {\n color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n","@import '~sn-stylekit/dist/stylekit.css';\n@import '~codemirror/lib/codemirror.css';\n@import '~codemirror/addon/dialog/dialog.css';\n@import '~codemirror/addon/search/matchesonscrollbar.css';\n@import '~highlight.js/scss/vs.scss';\n\n:root {\n --sn-stylekit-font-size-editor: 16px;\n --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo,\n 'Ubuntu Mono', courier, monospace;\n}\n\n@media screen and (max-width: 650px) {\n :root {\n --sn-stylekit-font-size-editor: 18px;\n }\n h1 {\n font-size: 1.75em; // is usually 2em\n }\n}\n\nbody,\nhtml {\n font-family: var(--sn-stylekit-sans-serif-font);\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n font-size: var(--sn-stylekit-base-font-size);\n background-color: transparent;\n}\n\n* {\n // To prevent gray flash when focusing input on mobile Safari\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nbutton {\n font-family: var(--sn-stylekit-sans-serif-font);\n background-color: transparent;\n}\n\nbutton:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n}\n\nbutton:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n}\n\n.sn-component {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n //overflow-y: scroll;\n\n .sk-panel.main {\n max-width: 700px;\n width: 100%;\n margin: 10px 5px;\n\n @media screen and (max-width: 725px) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n box-shadow: none;\n margin: 0;\n }\n }\n .sk-panel.main.edit.otherEditor,\n .sk-panel.main.appendix.otherEditor {\n @media screen and (max-width: 725px) {\n border-top: none;\n }\n }\n .sk-panel.main.edit.monacoEditor,\n .sk-panel.main.appendix.monacoEditor {\n max-width: 800px;\n }\n\n .sk-panel-content.view {\n //height: inherit !important;\n //padding: 1.6rem 2rem !important;\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n //width: 700px;\n @media screen and (max-width: 725px) {\n //padding: 0.16rem 0.2rem !important;\n padding: 0px !important;\n }\n }\n\n .sk-panel-content.edit {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n //padding: .16rem .2rem !important;\n padding-left: 0px !important;\n padding-right: 0px !important;\n padding-top: 0px !important;\n }\n\n // Hides the horizontal scroll bar when using the Monaco Editor\n // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words\n &.monacoEditor {\n overflow-x: hidden !important;\n }\n }\n\n .sk-input.textarea {\n min-height: 136px;\n padding: 9px 10px;\n max-width: inherit;\n width: calc(100% - 22px);\n height: 100%;\n resize: vertical;\n overflow-y: auto;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n line-height: 1.7;\n }\n\n // This is automatic in Microsoft Edge.\n // We need to make it explicit for Firefox.\n .sk-input.textarea:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n }\n\n .sk-input.textarea.editnote {\n max-height: calc(100% - 32px);\n }\n\n .sk-input.textarea.append {\n max-height: calc(100% - 22px);\n }\n\n .sk-panel-row {\n // used in #appendix\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; // default is 0.4rem top only\n\n .sk-button-group.stretch {\n display: flex;\n justify-content: space-between;\n width: 50%;\n margin-left: auto;\n margin-right: auto;\n }\n }\n}\n\n#header {\n //border-bottom: 0px;\n //border-bottom: 1px solid var(--sn-stylekit-border-color);\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n display: flex;\n overflow: auto;\n padding: 10px 0;\n width: 100%;\n\n svg::after {\n content: '';\n background: var(--sn-stylekit-info-color);\n opacity: 0.1;\n }\n\n .sk-button-group {\n max-width: 700px;\n padding-left: 2px;\n padding-right: 2px;\n display: flex;\n margin-left: auto;\n margin-right: auto;\n //justify-content: space-between;\n\n button {\n border-width: 0px;\n font-size: 16px;\n\n .sk-label {\n font-weight: inherit;\n }\n }\n .sk-button.off {\n opacity: 0.75;\n }\n .sk-button.divider {\n opacity: 0.25;\n cursor: unset;\n margin-right: 0px;\n }\n .sk-button.info.off {\n color: var(--sn-stylekit-info-color);\n background-color: transparent;\n }\n .sk-button.info.off::before {\n background-color: transparent;\n }\n .sk-button.info.off:hover {\n //color: var(--sn-stylekit-info-contrast-color);\n //background-color: var(--sn-stylekit-info-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n .sk-button.info.off::before:hover {\n //background-color: var(--sn-stylekit-info-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n @media screen and (max-width: 450px) {\n #printButton {\n display: none;\n }\n }\n }\n}\n\n#menu {\n background-color: var(--sn-stylekit-background-color);\n display: flex;\n flex-direction: column;\n height: calc(100% - 62px);\n border: 1px solid var(--sn-stylekit-border-color);\n border-right-width: 0px;\n margin-bottom: 20px;\n margin-right: 0px;\n margin-top: 0px;\n min-width: 40%;\n position: absolute;\n right: 0px;\n z-index: 2;\n text-align: center;\n\n button,\n p {\n color: var(--sn-stylekit-foreground-color);\n font-size: var(--sn-stylekit-font-size-editor);\n margin: 10px 20px;\n }\n button {\n border-width: 1px;\n padding: 8px 12px;\n text-align: left;\n }\n // notification\n .notification {\n &.visible {\n visibility: visible;\n opacity: 1;\n transition: opacity 200ms ease-in;\n }\n\n &.hidden {\n visibility: hidden;\n opacity: 0;\n transition: visibility 0s 500ms, opacity 500ms ease-out;\n }\n }\n}\n\n#content {\n background-color: var(--sn-stylekit-contrast-background-color);\n flex: auto;\n display: flex;\n justify-content: center;\n\n @media screen and (max-width: 725px) {\n padding: 0;\n }\n}\n\n#menu,\n#content,\n#appendix,\n.DynamicEditor {\n font-size: var(--sn-stylekit-font-size-editor);\n a {\n color: var(--sn-stylekit-info-color); // #086dd6;\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n blockquote {\n margin: 0;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0 1em;\n color: #6a737d;\n border-left: 0.25em solid #dfe2e5;\n }\n\n hr {\n border: 0.5px solid var(--sn-stylekit-border-color);\n }\n\n img {\n max-width: 100%; // 645.500px;\n }\n\n table {\n display: block;\n width: 100%;\n overflow: auto;\n margin-top: 0;\n margin-bottom: 16px;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n background-color: transparent; // #fff;\n border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1;\n }\n\n td,\n th {\n padding: 6px 13px;\n border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5;\n }\n\n tr:nth-child(2n) {\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // #f6f8fa;\n code,\n pre {\n background-color: var(--sn-stylekit-background-color);\n }\n }\n }\n summary {\n .link {\n display: inline;\n color: var(--sn-stylekit-info-color);\n }\n .link:hover {\n text-decoration: underline;\n }\n }\n\n h1,\n h2,\n h3 {\n line-height: normal;\n }\n}\n\n// Exclude CodeMirror\n#appendDynamicEditor,\n#dynamicEditor,\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n#settings,\n.DynamicEditor,\n.rendered-note-section {\n code,\n pre {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .hljs {\n color: var(--sn-stylekit-contrast-foreground-color);\n }\n .hljs-tag {\n color: var(--sn-stylekit-foreground-color);\n }\n\n code {\n box-sizing: border-box;\n word-wrap: break-word;\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);\n border-radius: 3px;\n }\n\n pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode\n color: var(--sn-stylekit-foreground-color);\n border-radius: 3px;\n word-wrap: normal;\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n background-color: transparent;\n border: 0;\n }\n\n pre code {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: initial;\n border: 0;\n }\n}\n\n#errorBoundary,\n#help,\n#intro,\n.rendered-note-section {\n padding: 9px 10px;\n border: 1px transparent;\n border-style: solid;\n margin-left: auto;\n margin-right: auto;\n max-width: 645.5px; //628.700px;\n}\n\n.rendered-note-section {\n height: calc(100% - 20px);\n}\n\n// Same selection plus #renderedNote\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n.rendered-section {\n /*align-items: center;\n justify-content: space-between;\n min-width: inherit;\n width: 100%;*/\n word-wrap: break-word;\n overflow-wrap: break-word;\n line-height: 1.7;\n}\n\n#errorBoundary > :nth-child(1),\n#renderedNote > div > :nth-child(1),\n.ProseMirror > :nth-child(2) {\n margin-top: 0px;\n}\n\n.sk-notification {\n // Hacking sk-notification style\n overflow: visible !important; // We need this for the dropdown menu\n margin: 10px 0 0 0 !important;\n //padding: 28px 14px 28px 28px !important;\n padding: 21px 14px 21px 28px !important; //top left bottom right\n}\n\n.note-dialog {\n max-width: 700px;\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 200;\n}\n\n#settings .sk-panel-section:last-child {\n margin-bottom: 0px;\n}\n.sk-panel-section {\n padding-bottom: 0px;\n}\n\n#content .note-dialog,\n.sk-panel.main.settings {\n h1 {\n margin: 0.2em 0px;\n }\n .title-section {\n padding-top: 0px;\n }\n .text-and-undo-button {\n display: flex;\n p,\n .undo-button {\n margin-top: 0px;\n margin-bottom: 0px;\n display: inline;\n }\n }\n button {\n border-width: 0px;\n font-size: 16px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n &.toggle-button {\n padding-left: 0px;\n display: flex;\n }\n .chevron-button,\n .button-caption {\n line-height: 20px;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n .button-caption {\n color: var(--sn-stylekit-foreground-color);\n }\n .sk-label {\n font-weight: normal !important;\n }\n }\n button:hover,\n input[type='checkbox' i]:hover {\n cursor: pointer;\n }\n\n .sk-panel-header {\n .sk-button.info {\n color: var(--sn-stylekit-info-color);\n background-color: transparent;\n }\n .sk-button.info::before {\n background-color: transparent;\n }\n .sk-button.info:hover {\n color: var(--sn-stylekit-info-contrast-color);\n background-color: var(--sn-stylekit-info-color);\n a {\n color: var(--sn-stylekit-info-contrast-color);\n }\n }\n .sk-button.info::before:hover {\n background-color: var(--sn-stylekit-info-color);\n }\n }\n\n .sk-panel-row.settings {\n padding-top: 0.2rem;\n label,\n input,\n select {\n cursor: pointer;\n }\n input,\n select {\n font-size: 16px;\n padding: 0.5rem;\n background-color: var(--sn-stylekit-contrast-background-color);\n border-color: var(--sn-stylekit-border-color);\n color: var(--sn-stylekit-foreground-color);\n }\n input[type='text'] {\n min-width: 250px;\n }\n input[type='checkbox'] {\n min-width: 250px;\n }\n select {\n min-width: 267px;\n }\n .radio {\n margin-top: 3px;\n margin-bottom: 3px;\n }\n textarea {\n // This seems to make the textarea blurry on Firefox\n white-space: pre;\n overflow-x: auto;\n font-family: var(--sn-stylekit-monospace-font);\n }\n // Collapse on mobile\n @media screen and (max-width: 480px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n\n input {\n margin-top: 1rem;\n }\n }\n }\n}\n\n.note-overlay {\n position: fixed !important;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n}\n\n#appendix {\n background-color: var(--sn-stylekit-contrast-background-color);\n display: block;\n\n .sk-button-group {\n display: flex;\n justify-content: space-between;\n width: 50%;\n margin-left: auto;\n margin-right: auto;\n }\n .sk-panel {\n margin-top: 0;\n margin-left: auto;\n margin-right: auto;\n }\n\n .checkBoxForm {\n position: absolute;\n font-size: 13px;\n\n label {\n cursor: pointer;\n }\n padding-left: 25px;\n @media screen and (max-width: 600px) {\n padding-left: 10px;\n }\n @media screen and (max-width: 500px) {\n padding-left: 5px;\n }\n @media screen and (max-width: 455px) {\n label {\n font-size: 12px;\n }\n }\n @media screen and (max-width: 426px) {\n label {\n font-size: 11px;\n }\n }\n @media screen and (max-width: 410px) {\n label {\n font-size: 10px;\n }\n }\n @media screen and (max-width: 388px) {\n label {\n font-size: 9px;\n }\n }\n }\n\n #appendTextButton,\n #scrollToTopButton,\n #scrollToBottomButton {\n border-width: 0px;\n font-size: 14px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n .sk-label {\n font-weight: inherit;\n }\n }\n\n #scrollToTopButton {\n position: fixed;\n right: 25px;\n bottom: 45px;\n @media screen and (max-width: 725px) {\n right: 15px;\n bottom: 5.2px;\n }\n }\n #scrollToBottomButton {\n position: fixed;\n right: 25px;\n bottom: 10px;\n @media screen and (max-width: 725px) {\n right: 55px;\n bottom: 5.2px;\n }\n }\n}\n\n.MonacoEditorContainer,\n.MonacoDiffEditorContainer {\n min-height: 200px;\n width: calc(100% - 1.5px);\n max-width: inherit;\n max-height: inherit;\n}\n\n.edit .MonacoEditorContainer,\n.edit .MonacoDiffEditorContainer {\n min-height: 200px;\n height: calc(100% - 25px);\n margin-bottom: 25px;\n}\n\n#appendix .MonacoEditorContainer {\n height: 400px;\n}\n\n@import './codemirror.scss';\n@import './dynamicEditor.scss';\n@import './print.scss';\n@import './dark.scss';\n","#content .CodeMirror {\n max-height: calc(100% - 1rem);\n}\n\n#appendix .CodeMirror {\n max-height: calc(100% - 2px);\n}\n\n.CodeMirror {\n //fix : margin left is 30px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n background: inherit;\n color: inherit;\n line-height: 1.7;\n min-height: 8.25em;\n border: 1px solid var(--sn-stylekit-contrast-border-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n\n @media screen and (max-width: 725px) {\n border-top: 1px solid var(--sn-stylekit-border-color);\n }\n .CodeMirror-scroll,\n .CodeMirror-sizer,\n .CodeMirror-gutter,\n .CodeMirror-gutters,\n .CodeMirror-linenumber {\n background: inherit;\n }\n .CodeMirror-linenumber {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .cm-header.cm-header-1 {\n font-size: 2em;\n }\n .cm-header.cm-header-2 {\n font-size: 1.5em;\n }\n .cm-header.cm-header-3 {\n font-size: 1.17em;\n }\n .cm-header.cm-header-4 {\n font-size: 1em;\n }\n .cm-comment {\n background-color: var(--sn-stylekit-contrast-background-color);\n color: var(--sn-stylekit-contrast-foreground-color);\n font-family: var(--sn-stylekit-monospace-font);\n font-size: 85%;\n margin: 0;\n padding: 0.2em 0.4em;\n }\n .cm-comment.CodeMirror-selectedtext,\n .cm-comment.cm-link.CodeMirror-selectedtext {\n background-color: unset;\n }\n .cm-attribute,\n .cm-header {\n color: var(--sn-stylekit-success-color);\n }\n .cm-variable,\n .cm-variable-1,\n .cm-variable-2,\n .cm-variable-3,\n .cm-string-2,\n .cm-tag,\n .cm-tag.cm-bracket {\n color: var(--sn-stylekit-foreground-color);\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n }\n .cm-builtin,\n .cm-string,\n .cm-string.cm-url.cm-variable-2 {\n color: var(--sn-stylekit-warning-color);\n }\n .cm-error {\n color: var(--sn-stylekit-danger-color);\n }\n .cm-link,\n .cm-link.cm-variable-2 {\n color: var(--sn-stylekit-info-color);\n }\n .cm-quote {\n color: #6a737d;\n }\n}\n.cm-link,\n.cm-string,\n.cm-keyword,\n.cm-builtin,\n.cm-number,\n.cm-attribute {\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n}\n.CodeMirror-dialog {\n position: fixed;\n background: var(--sn-stylekit-background-color);\n}\n.CodeMirror-cursor {\n border-color: var(--sn-stylekit-info-color);\n}\n.CodeMirror-selected {\n background: var(--sn-stylekit-input-placeholder-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-focused .CodeMirror-selected {\n background: var(--sn-stylekit-info-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-selectedtext {\n background: transparent;\n color: var(--sn-stylekit-info-contrast-color);\n}\n",".DynamicEditor {\n padding: 9px 30px 10px;\n div[class^='sc'] {\n background-color: var(--sn-stylekit-background-color);\n }\n}\nbutton.block-menu-trigger {\n display: none !important;\n}\n@media screen and (min-width: 725px) {\n .DynamicEditor {\n padding: 5px 20px 10px;\n }\n}\n@media screen and (min-width: 600px) {\n .YouTube {\n min-height: 315px;\n min-width: 560px;\n margin: 10px auto;\n display: block;\n }\n}\n\n.ProseMirror {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n}\n","@media print {\n .printURL {\n a[href]:after {\n content: ' (' attr(href) ')';\n }\n }\n\n .sn-component {\n outline: none;\n }\n\n #appendix,\n #header,\n #menu {\n display: none;\n }\n\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n }\n\n .sk-panel.main.view {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n }\n\n .sk-panel.main.edit,\n .sk-panel.main.appendix {\n display: none;\n background-color: var(--sn-stylekit-background-color);\n }\n\n .content,\n .appendix {\n background-color: var(--sn-stylekit-background-color) !important;\n }\n\n #renderedNote pre code {\n white-space: pre-wrap;\n word-break: break-word;\n }\n}\n\n.sk-panel.main.printModeOn {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n}\n\n.sk-panel.main.view.printModeOn {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n}\n\n.sk-panel.main.edit.printModeOn,\n.sk-panel.main.appendix.printModeOn {\n background-color: var(--sn-stylekit-background-color);\n}\n\n.content.printModeOn,\n.appendix.printModeOn {\n background-color: var(--sn-stylekit-background-color) !important;\n}\n","@media (prefers-color-scheme: dark) {\n // This is the Midnight theme available here:\n // https://github.com/sn-extensions/midnight-theme\n // Licensed under AGPL-3.0\n :root {\n --primary-bg-color: #292937;\n --secondary-bg-color: #313142;\n --editor-bg-color: #202020;\n --border-color: #13131a;\n --ui-text-color: #d8d8d8;\n\n --sn-stylekit-info-color: #086dd6;\n --sn-stylekit-info-contrast-color: white;\n\n --sn-stylekit-neutral-color: #7c7c7c;\n --sn-stylekit-neutral-contrast-color: white;\n\n --sn-stylekit-success-color: #2b9612;\n --sn-stylekit-success-contrast-color: white;\n\n --sn-stylekit-warning-color: #f6a200;\n --sn-stylekit-warning-contrast-color: white;\n\n --sn-stylekit-danger-color: #f80324;\n --sn-stylekit-danger-contrast-color: white;\n\n --sn-desktop-titlebar-bg-color: var(--primary-bg-color);\n --sn-desktop-titlebar-border-color: var(--border-color);\n --sn-desktop-titlebar-ui-color: var(--ui-text-color);\n --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color);\n\n // StyleKit Vars\n --sn-stylekit-shadow-color: #20202b;\n\n --sn-stylekit-background-color: #20202b;\n --sn-stylekit-border-color: var(--border-color);\n --sn-stylekit-foreground-color: var(--ui-text-color);\n\n --sn-stylekit-contrast-background-color: var(--secondary-bg-color);\n --sn-stylekit-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-contrast-border-color: var(--border-color);\n\n --sn-stylekit-secondary-background-color: #292937;\n --sn-stylekit-secondary-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-border-color: var(--border-color);\n\n --sn-stylekit-secondary-contrast-background-color: #45445a;\n --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-contrast-border-color: var(--border-color);\n\n --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);\n --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);\n\n --sn-stylekit-paragraph-text-color: var(--ui-text-color);\n\n --sn-stylekit-scrollbar-track-border-color: var(--border-color);\n --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color);\n }\n}\n"]} \ No newline at end of file diff --git a/build/static/css/main.52f19b8d.chunk.css b/build/static/css/main.52f19b8d.chunk.css deleted file mode 100644 index 2e2c7f1b..00000000 --- a/build/static/css/main.52f19b8d.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--sn-stylekit-font-size-editor:16px;--sn-stylekit-monospace-font:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace}@media screen and (max-width:650px){:root{--sn-stylekit-font-size-editor:18px}h1{font-size:1.75em}}body,html{font-family:var(--sn-stylekit-sans-serif-font);height:100%;width:100%;margin:0;padding:0;font-size:var(--sn-stylekit-base-font-size);background-color:transparent}*{-webkit-tap-highlight-color:rgba(0,0,0,0)}button{font-family:var(--sn-stylekit-sans-serif-font);background-color:transparent}button:hover{background-color:var(--sn-stylekit-contrast-background-color)}button:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component{display:flex;flex-direction:column;min-height:100vh}.sn-component .sk-panel.main{max-width:700px;width:100%;margin:10px 5px}@media screen and (max-width:725px){.sn-component .sk-panel.main{border-left:none;border-right:none;border-bottom:none;box-shadow:none;margin:0}}@media screen and (max-width:725px){.sn-component .sk-panel.main.appendix.otherEditor,.sn-component .sk-panel.main.edit.otherEditor{border-top:none}}.sn-component .sk-panel.main.appendix.monacoEditor,.sn-component .sk-panel.main.edit.monacoEditor{max-width:800px}.sn-component .sk-panel-content.view{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.view{padding:0!important}}.sn-component .sk-panel-content.edit{padding:1rem 1.25rem 0!important}@media screen and (max-width:725px){.sn-component .sk-panel-content.edit{padding-left:0!important;padding-right:0!important;padding-top:0!important}}.sn-component .sk-panel-content.edit.monacoEditor{overflow-x:hidden!important}.sn-component .sk-input.textarea{min-height:136px;padding:9px 10px;max-width:inherit;width:calc(100% - 22px);height:100%;resize:vertical;overflow-y:auto;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);line-height:1.7}.sn-component .sk-input.textarea:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.sn-component .sk-input.textarea.editnote{max-height:calc(100% - 32px)}.sn-component .sk-input.textarea.append{max-height:calc(100% - 22px)}.sn-component .sk-panel-row{padding-top:.5rem;padding-bottom:.5rem}.sn-component .sk-panel-row .sk-button-group.stretch{display:flex;justify-content:space-between;width:50%;margin-left:auto;margin-right:auto}#header{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color);padding:10px 0;display:flex;flex-direction:column;align-items:center;margin-left:auto;margin-right:auto;width:100%}#header svg:after{content:"";background:var(--sn-stylekit-info-color);opacity:.1}#header .sk-button-group{max-width:700px;overflow-x:auto;padding-left:2px;padding-right:2px}#header .sk-button-group button{border-width:0;font-size:16px}#header .sk-button-group button .sk-label{font-weight:inherit}#header .sk-button-group .sk-button.off{opacity:.75}#header .sk-button-group .sk-button.divider{opacity:.25;cursor:unset;margin-right:0}#header .sk-button-group .sk-button.info.off{color:var(--sn-stylekit-info-color);background-color:transparent}#header .sk-button-group .sk-button.info.off:before{background-color:transparent}#header .sk-button-group .sk-button.info.off:before:hover,#header .sk-button-group .sk-button.info.off:hover{background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:450px){#header .sk-button-group #printButton{display:none}}#content{background-color:var(--sn-stylekit-contrast-background-color);flex:1 1;display:flex;justify-content:center}@media screen and (max-width:725px){#content{padding:0}}#appendix,#content,.DynamicEditor{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}#appendix a,#content a,.DynamicEditor a{color:var(--sn-stylekit-info-color);text-decoration:none}#appendix a:hover,#content a:hover,.DynamicEditor a:hover{text-decoration:underline}#appendix blockquote,#content blockquote,.DynamicEditor blockquote{margin:0 0 16px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}#appendix hr,#content hr,.DynamicEditor hr{border:.5px solid var(--sn-stylekit-border-color)}#appendix img,#content img,.DynamicEditor img{max-width:100%}#appendix table,#content table,.DynamicEditor table{display:block;width:100%;overflow:auto;margin-top:0;margin-bottom:16px;border-spacing:0;border-collapse:collapse}#appendix table tr,#content table tr,.DynamicEditor table tr{background-color:transparent;border-top:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table td,#appendix table th,#content table td,#content table th,.DynamicEditor table td,.DynamicEditor table th{padding:6px 13px;border:1px solid var(--sn-stylekit-contrast-border-color)}#appendix table tr:nth-child(2n),#content table tr:nth-child(2n),.DynamicEditor table tr:nth-child(2n){background-color:var(--sn-stylekit-contrast-background-color)}#appendix table tr:nth-child(2n) code,#appendix table tr:nth-child(2n) pre,#content table tr:nth-child(2n) code,#content table tr:nth-child(2n) pre,.DynamicEditor table tr:nth-child(2n) code,.DynamicEditor table tr:nth-child(2n) pre{background-color:var(--sn-stylekit-background-color)}#appendix summary .link,#content summary .link,.DynamicEditor summary .link{display:inline;color:var(--sn-stylekit-info-color)}#appendix summary .link:hover,#content summary .link:hover,.DynamicEditor summary .link:hover{text-decoration:underline}#appendix h1,#appendix h2,#appendix h3,#content h1,#content h2,#content h3,.DynamicEditor h1,.DynamicEditor h2,.DynamicEditor h3{line-height:normal}#appendDynamicEditor code,#appendDynamicEditor pre,#dynamicEditor code,#dynamicEditor pre,#errorBoundary code,#errorBoundary pre,#help code,#help pre,#intro code,#intro pre,#renderedNote code,#renderedNote pre,#settings code,#settings pre,.DynamicEditor code,.DynamicEditor pre,.rendered-note-section code,.rendered-note-section pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}#appendDynamicEditor .hljs,#dynamicEditor .hljs,#errorBoundary .hljs,#help .hljs,#intro .hljs,#renderedNote .hljs,#settings .hljs,.DynamicEditor .hljs,.rendered-note-section .hljs{color:var(--sn-stylekit-contrast-foreground-color)}#appendDynamicEditor .hljs-tag,#dynamicEditor .hljs-tag,#errorBoundary .hljs-tag,#help .hljs-tag,#intro .hljs-tag,#renderedNote .hljs-tag,#settings .hljs-tag,.DynamicEditor .hljs-tag,.rendered-note-section .hljs-tag{color:var(--sn-stylekit-foreground-color)}#appendDynamicEditor code,#dynamicEditor code,#errorBoundary code,#help code,#intro code,#renderedNote code,#settings code,.DynamicEditor code,.rendered-note-section code{box-sizing:border-box;word-wrap:break-word;padding:.2em .4em;margin:0;font-size:85%;background-color:var(--sn-stylekit-contrast-background-color);border-radius:3px}#appendDynamicEditor pre,#dynamicEditor pre,#errorBoundary pre,#help pre,#intro pre,#renderedNote pre,#settings pre,.DynamicEditor pre,.rendered-note-section pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-foreground-color);border-radius:3px;word-wrap:normal;margin-top:0;margin-bottom:16px}#appendDynamicEditor pre>code,#dynamicEditor pre>code,#errorBoundary pre>code,#help pre>code,#intro pre>code,#renderedNote pre>code,#settings pre>code,.DynamicEditor pre>code,.rendered-note-section pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;background-color:transparent;border:0}#appendDynamicEditor pre code,#dynamicEditor pre code,#errorBoundary pre code,#help pre code,#intro pre code,#renderedNote pre code,#settings pre code,.DynamicEditor pre code,.rendered-note-section pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;background-color:initial;border:0}#errorBoundary,#help,#intro,.rendered-note-section{padding:9px 10px;border:1px solid transparent;margin-left:auto;margin-right:auto;max-width:645.5px}.rendered-note-section{height:calc(100% - 20px)}#errorBoundary,#help,#intro,#renderedNote,.rendered-section{word-wrap:break-word;overflow-wrap:break-word;line-height:1.7}#errorBoundary>:first-child,#renderedNote>div>:first-child,.ProseMirror>:nth-child(2){margin-top:0}.sk-notification{overflow:visible!important;margin:10px 0 0!important;padding:21px 14px 21px 28px!important}.note-dialog{max-width:700px;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:200}#settings .sk-panel-section:last-child{margin-bottom:0}.sk-panel-section{padding-bottom:0}#content .note-dialog h1,.sk-panel.main.settings h1{margin:.2em 0}#content .note-dialog .title-section,.sk-panel.main.settings .title-section{padding-top:0}#content .note-dialog .text-and-undo-button,.sk-panel.main.settings .text-and-undo-button{display:flex}#content .note-dialog .text-and-undo-button .undo-button,#content .note-dialog .text-and-undo-button p,.sk-panel.main.settings .text-and-undo-button .undo-button,.sk-panel.main.settings .text-and-undo-button p{margin-top:0;margin-bottom:0;display:inline}#content .note-dialog button,.sk-panel.main.settings button{border-width:0;font-size:16px}@media screen and (max-width:650px){#content .note-dialog button,.sk-panel.main.settings button{font-size:17px}}#content .note-dialog button.toggle-button,.sk-panel.main.settings button.toggle-button{padding-left:0;display:flex}#content .note-dialog button .button-caption,#content .note-dialog button .chevron-button,.sk-panel.main.settings button .button-caption,.sk-panel.main.settings button .chevron-button{line-height:20px;margin-top:5px;margin-bottom:5px}#content .note-dialog button .button-caption,.sk-panel.main.settings button .button-caption{color:var(--sn-stylekit-foreground-color)}#content .note-dialog button .sk-label,.sk-panel.main.settings button .sk-label{font-weight:400!important}#content .note-dialog button:hover,#content .note-dialog input[type=checkbox i]:hover,.sk-panel.main.settings button:hover,.sk-panel.main.settings input[type=checkbox i]:hover{cursor:pointer}#content .note-dialog .sk-panel-header .sk-button.info,.sk-panel.main.settings .sk-panel-header .sk-button.info{color:var(--sn-stylekit-info-color);background-color:transparent}#content .note-dialog .sk-panel-header .sk-button.info:before,.sk-panel.main.settings .sk-panel-header .sk-button.info:before{background-color:transparent}#content .note-dialog .sk-panel-header .sk-button.info:hover,.sk-panel.main.settings .sk-panel-header .sk-button.info:hover{color:var(--sn-stylekit-info-contrast-color);background-color:var(--sn-stylekit-info-color)}#content .note-dialog .sk-panel-header .sk-button.info:hover a,.sk-panel.main.settings .sk-panel-header .sk-button.info:hover a{color:var(--sn-stylekit-info-contrast-color)}#content .note-dialog .sk-panel-header .sk-button.info:before:hover,.sk-panel.main.settings .sk-panel-header .sk-button.info:before:hover{background-color:var(--sn-stylekit-info-color)}#content .note-dialog .sk-panel-row.settings,.sk-panel.main.settings .sk-panel-row.settings{padding-top:.2rem}#content .note-dialog .sk-panel-row.settings input,#content .note-dialog .sk-panel-row.settings label,#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings label,.sk-panel.main.settings .sk-panel-row.settings select{cursor:pointer}#content .note-dialog .sk-panel-row.settings input,#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings select{font-size:16px;padding:.5rem;background-color:var(--sn-stylekit-contrast-background-color);border-color:var(--sn-stylekit-border-color);color:var(--sn-stylekit-foreground-color)}#content .note-dialog .sk-panel-row.settings input[type=checkbox],#content .note-dialog .sk-panel-row.settings input[type=text],.sk-panel.main.settings .sk-panel-row.settings input[type=checkbox],.sk-panel.main.settings .sk-panel-row.settings input[type=text]{min-width:250px}#content .note-dialog .sk-panel-row.settings select,.sk-panel.main.settings .sk-panel-row.settings select{min-width:267px}#content .note-dialog .sk-panel-row.settings .radio,.sk-panel.main.settings .sk-panel-row.settings .radio{margin-top:3px;margin-bottom:3px}#content .note-dialog .sk-panel-row.settings textarea,.sk-panel.main.settings .sk-panel-row.settings textarea{white-space:pre;overflow-x:auto;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}@media screen and (max-width:480px){#content .note-dialog .sk-panel-row.settings,.sk-panel.main.settings .sk-panel-row.settings{flex-direction:column!important;align-items:flex-start!important}#content .note-dialog .sk-panel-row.settings input,.sk-panel.main.settings .sk-panel-row.settings input{margin-top:1rem}}.note-overlay{position:fixed!important;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:100}#appendix{background-color:var(--sn-stylekit-contrast-background-color);display:block}#appendix .sk-button-group{display:flex;justify-content:space-between;width:50%;margin-left:auto;margin-right:auto}#appendix .sk-panel{margin-top:0;margin-left:auto;margin-right:auto}#appendix .checkBoxForm{position:absolute;font-size:13px;padding-left:25px}#appendix .checkBoxForm label{cursor:pointer}@media screen and (max-width:600px){#appendix .checkBoxForm{padding-left:10px}}@media screen and (max-width:500px){#appendix .checkBoxForm{padding-left:5px}}@media screen and (max-width:455px){#appendix .checkBoxForm label{font-size:12px}}@media screen and (max-width:426px){#appendix .checkBoxForm label{font-size:11px}}@media screen and (max-width:410px){#appendix .checkBoxForm label{font-size:10px}}@media screen and (max-width:388px){#appendix .checkBoxForm label{font-size:9px}}#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{border-width:0;font-size:14px}@media screen and (max-width:650px){#appendix #appendTextButton,#appendix #scrollToBottomButton,#appendix #scrollToTopButton{font-size:17px}}#appendix #appendTextButton .sk-label,#appendix #scrollToBottomButton .sk-label,#appendix #scrollToTopButton .sk-label{font-weight:inherit}#appendix #scrollToTopButton{position:fixed;right:25px;bottom:45px}@media screen and (max-width:725px){#appendix #scrollToTopButton{right:15px;bottom:5.2px}}#appendix #scrollToBottomButton{position:fixed;right:25px;bottom:10px}@media screen and (max-width:725px){#appendix #scrollToBottomButton{right:55px;bottom:5.2px}}.MonacoDiffEditorContainer,.MonacoEditorContainer{min-height:200px;width:calc(100% - 1.5px);max-width:inherit;max-height:inherit}.edit .MonacoDiffEditorContainer,.edit .MonacoEditorContainer{min-height:200px;height:calc(100% - 25px);margin-bottom:25px}#appendix .MonacoEditorContainer{height:400px}#content .CodeMirror{max-height:calc(100% - 1rem)}#appendix .CodeMirror{max-height:calc(100% - 2px)}.CodeMirror{font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);background:inherit;color:inherit;line-height:1.7;min-height:8.25em;border:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color)}@media screen and (max-width:725px){.CodeMirror{border-top:1px solid var(--sn-stylekit-border-color)}}.CodeMirror .CodeMirror-gutter,.CodeMirror .CodeMirror-gutters,.CodeMirror .CodeMirror-linenumber,.CodeMirror .CodeMirror-scroll,.CodeMirror .CodeMirror-sizer{background:inherit}.CodeMirror .CodeMirror-linenumber{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font)}.CodeMirror .cm-header.cm-header-1{font-size:2em}.CodeMirror .cm-header.cm-header-2{font-size:1.5em}.CodeMirror .cm-header.cm-header-3{font-size:1.17em}.CodeMirror .cm-header.cm-header-4{font-size:1em}.CodeMirror .cm-comment{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono",courier,monospace;font-family:var(--sn-stylekit-monospace-font);font-size:85%;margin:0;padding:.2em .4em}.CodeMirror .cm-comment.cm-link.CodeMirror-selectedtext,.CodeMirror .cm-comment.CodeMirror-selectedtext{background-color:unset}.CodeMirror .cm-attribute,.CodeMirror .cm-header{color:var(--sn-stylekit-success-color)}.CodeMirror .cm-string-2,.CodeMirror .cm-tag,.CodeMirror .cm-tag.cm-bracket,.CodeMirror .cm-variable,.CodeMirror .cm-variable-1,.CodeMirror .cm-variable-2,.CodeMirror .cm-variable-3{color:var(--sn-stylekit-foreground-color)}.CodeMirror .cm-string-2.CodeMirror-selectedtext,.CodeMirror .cm-tag.cm-bracket.CodeMirror-selectedtext,.CodeMirror .cm-tag.CodeMirror-selectedtext,.CodeMirror .cm-variable-1.CodeMirror-selectedtext,.CodeMirror .cm-variable-2.CodeMirror-selectedtext,.CodeMirror .cm-variable-3.CodeMirror-selectedtext,.CodeMirror .cm-variable.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror .cm-builtin,.CodeMirror .cm-string,.CodeMirror .cm-string.cm-url.cm-variable-2{color:var(--sn-stylekit-warning-color)}.CodeMirror .cm-error{color:var(--sn-stylekit-danger-color)}.CodeMirror .cm-link,.CodeMirror .cm-link.cm-variable-2{color:var(--sn-stylekit-info-color)}.CodeMirror .cm-quote{color:#6a737d}.cm-attribute.CodeMirror-selectedtext,.cm-builtin.CodeMirror-selectedtext,.cm-keyword.CodeMirror-selectedtext,.cm-link.CodeMirror-selectedtext,.cm-number.CodeMirror-selectedtext,.cm-string.CodeMirror-selectedtext{color:var(--sn-stylekit-info-contrast-color);background:transparent}.CodeMirror-dialog{position:fixed;background:var(--sn-stylekit-background-color)}.CodeMirror-cursor{border-color:var(--sn-stylekit-info-color)}.CodeMirror-selected{background:var(--sn-stylekit-input-placeholder-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-focused .CodeMirror-selected{background:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.CodeMirror-selectedtext{background:transparent;color:var(--sn-stylekit-info-contrast-color)}.DynamicEditor{padding:9px 30px 10px}.DynamicEditor div[class^=sc]{background-color:var(--sn-stylekit-background-color)}button.block-menu-trigger{display:none!important}@media screen and (min-width:725px){.DynamicEditor{padding:5px 20px 10px}}@media screen and (min-width:600px){.YouTube{min-height:315px;min-width:560px;margin:10px auto;display:block}}.ProseMirror{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color)}@media print{.printURL a[href]:after{content:" (" attr(href) ")"}.sn-component{outline:none}#appendix,#header{display:none}.sk-panel.main{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix,.sk-panel.main.edit{display:none;background-color:var(--sn-stylekit-background-color)}.appendix,.content{background-color:var(--sn-stylekit-background-color)!important}#renderedNote pre code{white-space:pre-wrap;word-break:break-word}}.sk-panel.main.printModeOn{border:1px var(--sn-stylekit-background-color);box-shadow:none}.sk-panel.main.view.printModeOn{max-width:none;margin-top:0;margin-bottom:0}.sk-panel.main.appendix.printModeOn,.sk-panel.main.edit.printModeOn{background-color:var(--sn-stylekit-background-color)}.appendix.printModeOn,.content.printModeOn{background-color:var(--sn-stylekit-background-color)!important}@media (prefers-color-scheme:dark){:root{--primary-bg-color:#292937;--secondary-bg-color:#313142;--editor-bg-color:#202020;--border-color:#13131a;--ui-text-color:#d8d8d8;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-neutral-color:#7c7c7c;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-desktop-titlebar-bg-color:var(--primary-bg-color);--sn-desktop-titlebar-border-color:var(--border-color);--sn-desktop-titlebar-ui-color:var(--ui-text-color);--sn-desktop-titlebar-ui-hover-color:var(--sn-stylekit-info-color);--sn-stylekit-shadow-color:#20202b;--sn-stylekit-background-color:#20202b;--sn-stylekit-border-color:var(--border-color);--sn-stylekit-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-background-color:var(--secondary-bg-color);--sn-stylekit-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-border-color:var(--border-color);--sn-stylekit-secondary-background-color:#292937;--sn-stylekit-secondary-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-border-color:var(--border-color);--sn-stylekit-secondary-contrast-background-color:#45445a;--sn-stylekit-secondary-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-contrast-border-color:var(--border-color);--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:var(--ui-text-color);--sn-stylekit-scrollbar-track-border-color:var(--border-color);--sn-stylekit-scrollbar-thumb-color:var(--sn-stylekit-info-color)}} -/*# sourceMappingURL=main.52f19b8d.chunk.css.map */ \ No newline at end of file diff --git a/build/static/css/main.52f19b8d.chunk.css.map b/build/static/css/main.52f19b8d.chunk.css.map deleted file mode 100644 index b2e7464a..00000000 --- a/build/static/css/main.52f19b8d.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://src/index.scss","webpack://node_modules/highlight.js/scss/vs.scss","webpack://src/stylesheets/main.scss","webpack://src/stylesheets/codemirror.scss","webpack://src/stylesheets/dynamicEditor.scss","webpack://src/stylesheets/print.scss","webpack://src/stylesheets/dark.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CACnC,KAGC,yEACW,CCNb,MACE,aAAc,CACd,eAAgB,CAChB,YAAc,CACd,eAAiB,CACjB,UAAY,CACb,yCAKC,WAAc,CACf,qEAOC,UAAW,CACZ,0IAWC,aAAc,CACf,oEAMC,aAAc,CACf,aAGC,UAAc,CACf,WAGC,SAAW,CACZ,qCAKC,aAAc,CACf,eAIC,iBAAkB,CACnB,aAGC,eAAiB,CC5DnB,MACE,mCAA+B,CAC/B,0GAA6B,CAE9B,oCAGC,MACE,mCAA+B,CAChC,GAEC,gBAAiB,CAClB,CAGH,UAEE,8CAA+C,CAC/C,WAAY,CACZ,UAAW,CACX,QAAS,CACT,SAAU,CACV,2CAA4C,CAC5C,4BAA6B,CAC9B,EAIC,yCAA6C,CAC9C,OAGC,8CAA+C,CAC/C,4BAA6B,CAC9B,aAGC,6DAA8D,CAC/D,aAGC,yCAA0C,CAC1C,sCAAuC,CACvC,kBAAmB,CACnB,iBAAkB,CACnB,cAGC,YAAa,CACb,qBAAsB,CACtB,gBAAiB,CAHnB,6BAOI,eAAgB,CAChB,UAAW,CACX,eAAgB,CAEhB,oCAXJ,6BAYM,gBAAiB,CACjB,iBAAkB,CAClB,kBAAmB,CACnB,eAAgB,CAChB,QAAS,CAEZ,CAGC,oCArBJ,gGAsBM,eAAgB,CAEnB,CAxBH,kGA2BI,eAAgB,CA3BpB,qCAkCI,gCAA8B,CAE9B,oCApCJ,qCAsCM,mBAAuB,CAE1B,CAxCH,qCA4CI,gCAA8B,CAC9B,oCA7CJ,qCA+CM,wBAA4B,CAC5B,yBAA6B,CAC7B,uBAA2B,CAQ9B,CAzDH,kDAuDM,2BAA6B,CAvDnC,iCA4DI,gBAAiB,CACjB,gBAAiB,CACjB,iBAAkB,CAClB,uBAAwB,CACxB,WAAY,CACZ,eAAgB,CAChB,eAAgB,CAChB,8CAA+C,CAC/C,cAA8C,CAA9C,6CAA8C,CAC9C,eAAgB,CArEpB,uCA2EI,yCAA0C,CAC1C,sCAAuC,CACvC,kBAAmB,CACnB,iBAAkB,CA9EtB,0CAkFI,4BAA6B,CAlFjC,wCAsFI,4BAA6B,CAtFjC,4BA2FI,iBAAmB,CACnB,oBAAsB,CA5F1B,qDA+FM,YAAa,CACb,6BAA8B,CAC9B,SAAU,CACV,gBAAiB,CACjB,iBAAkB,CACnB,QAOH,oDAAqD,CACrD,yCAA0C,CAG1C,cAAe,CACf,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CAEnB,gBAAiB,CACjB,iBAAkB,CAClB,UAAW,CAdb,kBAiBI,UAAW,CACX,wCAAyC,CACzC,UAAY,CAnBhB,yBAuBI,eAAgB,CAChB,eAAgB,CAChB,gBAAiB,CACjB,iBAAkB,CA1BtB,gCAgCM,cAAiB,CACjB,cAAe,CAjCrB,0CAoCQ,mBAAoB,CApC5B,wCAwCM,WAAa,CAxCnB,4CA2CM,WAAa,CACb,YAAa,CACb,cAAiB,CA7CvB,6CAgDM,mCAAoC,CACpC,4BAA6B,CAjDnC,oDAoDM,4BAA6B,CApDnC,6GA6DM,6DAA8D,CAC/D,oCA9DL,sCAiEQ,YAAa,CACd,CAKP,SACE,6DAA8D,CAC9D,QAAO,CAEP,YAAa,CACb,sBAAuB,CAEvB,oCAPF,SAQI,SAAU,CAEb,CAED,kCAGE,cAAA,CAAA,6CAA8C,CAHhD,wCAKI,mCAAoC,CACpC,oBAAqB,CANzB,0DAUI,yBAA0B,CAV9B,mEAgBI,eAAmB,CACnB,aAAc,CACd,aAAc,CACd,+BAAiC,CAnBrC,2CAuBI,iDAAmD,CAvBvD,8CA2BI,cAAe,CA3BnB,oDA+BI,aAAc,CACd,UAAW,CACX,aAAc,CACd,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,wBAAyB,CArC7B,6DAwCM,4BAA6B,CAC7B,6DAA8D,CAzCpE,0HA8CM,gBAAiB,CACjB,yDAA0D,CA/ChE,uGAmDM,6DAEC,CArDP,yOAwDQ,oDAAqD,CAxD7D,4EA8DM,cAAe,CACf,mCAAoC,CA/D1C,8FAkEM,yBAA0B,CAlEhC,iIAyEI,kBAAmB,CACpB,6UAeC,yFAAA,CAAA,6CAA8C,CAXlD,oLAcI,kDAAmD,CAdvD,wNAiBI,yCAA0C,CAjB9C,2KAqBI,qBAAsB,CACtB,oBAAqB,CACrB,iBAAoB,CACpB,QAAS,CACT,aAAc,CACd,6DAEC,CACD,iBAAkB,CA7BtB,kKAiCI,YAAa,CACb,aAAc,CACd,aAAc,CACd,gBAAiB,CACjB,6DAEC,CACD,yCAA0C,CAC1C,iBAAkB,CAClB,gBAAiB,CACjB,YAAa,CACb,kBAAmB,CA5CvB,+MAgDI,SAAU,CACV,QAAS,CACT,cAAe,CACf,iBAAkB,CAClB,eAAgB,CAChB,sBAAuB,CACvB,4BAA6B,CAC7B,QAAS,CAvDb,+MA2DI,cAAe,CACf,cAAe,CACf,SAAU,CACV,QAAS,CACT,gBAAiB,CACjB,mBAAoB,CACpB,gBAAiB,CACjB,4BAAyB,CAAzB,wBAAyB,CACzB,QAAS,CACV,mDAOD,gBAAiB,CAEjB,4BAAmB,CACnB,gBAAiB,CACjB,iBAAkB,CAClB,iBAAkB,CACnB,uBAGC,wBAAyB,CAC1B,4DAYC,oBAAqB,CACrB,wBAAyB,CACzB,eAAgB,CACjB,sFAKC,YAAe,CAChB,iBAIC,0BAA4B,CAC5B,yBAA6B,CAE7B,qCAAuC,CACxC,aAGC,eAAgB,CAChB,UAAW,CACX,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,8BAAgC,CAChC,WAAY,CACb,uCAGC,eAAkB,CACnB,kBAEC,gBAAmB,CACpB,oDAKG,aAAiB,CAHrB,4EAMI,aAAgB,CANpB,0FASI,YAAa,CATjB,kNAYM,YAAe,CACf,eAAkB,CAClB,cAAe,CAdrB,4DAkBI,cAAiB,CACjB,cAAe,CACf,oCApBJ,4DAqBM,cAAe,CAkBlB,CAvCH,wFAwBM,cAAiB,CACjB,YAAa,CAzBnB,wLA6BM,gBAAiB,CACjB,cAAe,CACf,iBAAkB,CA/BxB,4FAkCM,yCAA0C,CAlChD,gFAqCM,yBAA8B,CArCpC,gLA0CI,cAAe,CA1CnB,gHA+CM,mCAAoC,CACpC,4BAA6B,CAhDnC,8HAmDM,4BAA6B,CAnDnC,4HAsDM,4CAA6C,CAC7C,8CAA+C,CAvDrD,gIAyDQ,4CAA6C,CAzDrD,0IA6DM,8CAA+C,CA7DrD,4FAkEI,iBAAmB,CAlEvB,0TAsEM,cAAe,CAtErB,kNA0EM,cAAe,CACf,aAAe,CACf,6DAA8D,CAC9D,4CAA6C,CAC7C,yCAA0C,CA9EhD,oQAoFM,eAAgB,CApFtB,0GAuFM,eAAgB,CAvFtB,0GA0FM,cAAe,CACf,iBAAkB,CA3FxB,8GA+FM,eAAgB,CAChB,eAAgB,CAChB,yFAAA,CAAA,6CAA8C,CAC/C,oCAlGL,4FAqGM,+BAAiC,CACjC,gCAAkC,CAtGxC,wGAyGQ,eAAgB,CACjB,CAKP,cACE,wBAA0B,CAC1B,UAAW,CACX,WAAY,CACZ,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QAAS,CACT,WAAY,CACb,UAGC,6DAA8D,CAC9D,aAAc,CAFhB,2BAKI,YAAa,CACb,6BAA8B,CAC9B,SAAU,CACV,gBAAiB,CACjB,iBAAkB,CATtB,oBAYI,YAAa,CACb,gBAAiB,CACjB,iBAAkB,CAdtB,wBAkBI,iBAAkB,CAClB,cAAe,CAKf,iBAAkB,CAxBtB,8BAsBM,cAAe,CAChB,oCAvBL,wBA0BM,iBAAkB,CAyBrB,CAvBC,oCA5BJ,wBA6BM,gBAAiB,CAsBpB,CApBC,oCA/BJ,8BAiCQ,cAAe,CAChB,CAEH,oCApCJ,8BAsCQ,cAAe,CAChB,CAEH,oCAzCJ,8BA2CQ,cAAe,CAChB,CAEH,oCA9CJ,8BAgDQ,aAAc,CACf,CAjDP,yFAwDI,cAAiB,CACjB,cAAe,CACf,oCA1DJ,yFA2DM,cAAe,CAKlB,CAhEH,uHA8DM,mBAAoB,CA9D1B,6BAmEI,cAAe,CACf,UAAW,CACX,WAAY,CACZ,oCAtEJ,6BAuEM,UAAW,CACX,YAAa,CAEhB,CA1EH,gCA4EI,cAAe,CACf,UAAW,CACX,WAAY,CACZ,oCA/EJ,gCAgFM,UAAW,CACX,YAAa,CAEhB,CAGH,kDAEE,gBAAiB,CACjB,wBAAyB,CACzB,iBAAkB,CAClB,kBAAmB,CACpB,8DAIC,gBAAiB,CACjB,wBAAyB,CACzB,kBAAmB,CACpB,iCAGC,YAAa,CACd,qBCnqBC,4BAA6B,CAC9B,sBAGC,2BAA4B,CAC7B,YAIC,8CAA+C,CAC/C,cAA8C,CAA9C,6CAA8C,CAC9C,kBAAmB,CACnB,aAAc,CACd,eAAgB,CAChB,iBAAkB,CAClB,yDAA0D,CAC1D,6DAA8D,CAE9D,oCAXF,YAYI,oDAAqD,CAoExD,CAhFD,+JAmBI,kBAAmB,CAnBvB,mCAsBI,yFAAA,CAAA,6CAA8C,CAtBlD,mCAyBI,aAAc,CAzBlB,mCA4BI,eAAgB,CA5BpB,mCA+BI,gBAAiB,CA/BrB,mCAkCI,aAAc,CAlClB,wBAqCI,6DAA8D,CAC9D,kDAAmD,CACnD,yFAA8C,CAA9C,6CAA8C,CAC9C,aAAc,CACd,QAAS,CACT,iBAAoB,CA1CxB,wGA8CI,sBAAuB,CA9C3B,iDAkDI,sCAAuC,CAlD3C,sLA2DI,yCAA0C,CA3D9C,8VA6DM,4CAA6C,CAC7C,sBAAuB,CA9D7B,2FAoEI,sCAAuC,CApE3C,sBAuEI,qCAAsC,CAvE1C,wDA2EI,mCAAoC,CA3ExC,sBA8EI,aAAc,CACf,qNASC,4CAA6C,CAC7C,sBAAuB,CACxB,mBAGD,cAAe,CACf,8CAA+C,CAChD,mBAEC,0CAA2C,CAC5C,qBAEC,qDAAsD,CACtD,4CAA6C,CAC9C,yCAEC,wCAAyC,CACzC,4CAA6C,CAC9C,yBAEC,sBAAuB,CACvB,4CAA6C,CAC9C,eCrHC,qBAAsB,CADxB,8BAGI,oDAAqD,CACtD,0BAGD,sBAAwB,CACzB,oCAEC,eACE,qBAAsB,CACvB,CAEH,oCACE,SACE,gBAAiB,CACjB,eAAgB,CAChB,gBAAiB,CACjB,aAAc,CACf,CAGH,aACE,oDAAqD,CACrD,yCAA0C,CAC3C,aCzBC,wBAEI,2BAA4B,CAC7B,cAID,YAAa,CACd,kBAIC,YAAa,CACd,eAGC,8CAA+C,CAC/C,eAAgB,CACjB,oBAGC,cAAe,CACf,YAAe,CACf,eAAkB,CACnB,4CAIC,YAAa,CACb,oDAAqD,CACtD,mBAIC,8DAAgE,CACjE,uBAGC,oBAAqB,CACrB,qBAAsB,CACvB,CAGH,2BACE,8CAA+C,CAC/C,eAAgB,CACjB,gCAGC,cAAe,CACf,YAAe,CACf,eAAkB,CACnB,oEAIC,oDAAqD,CACtD,2CAIC,8DAAgE,CACjE,mCC3DC,MACE,0BAAmB,CACnB,4BAAqB,CACrB,yBAAkB,CAClB,sBAAe,CACf,uBAAgB,CAEhB,gCAAyB,CACzB,sCAAkC,CAElC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,kCAA2B,CAC3B,wCAAoC,CAEpC,sDAA+B,CAC/B,sDAAmC,CACnC,mDAA+B,CAC/B,kEAAqC,CAGrC,kCAA2B,CAE3B,sCAA+B,CAC/B,8CAA2B,CAC3B,mDAA+B,CAE/B,iEAAwC,CACxC,4DAAwC,CACxC,uDAAoC,CAEpC,gDAAyC,CACzC,6DAAyC,CACzC,wDAAqC,CAErC,yDAAkD,CAClD,sEAAkD,CAClD,iEAA8C,CAE9C,yEAAsC,CACtC,yEAAsC,CAEtC,uDAAmC,CAEnC,8DAA2C,CAC3C,iEAAoC,CACrC","file":"main.52f19b8d.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond \n\n*/\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: white;\n color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n color: #2b91af;\n}\n\n.hljs-doctag {\n color: #808080;\n}\n\n.hljs-attr {\n color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n","@import '~sn-stylekit/dist/stylekit.css';\n@import '~codemirror/lib/codemirror.css';\n@import '~codemirror/addon/dialog/dialog.css';\n@import '~codemirror/addon/search/matchesonscrollbar.css';\n@import '~highlight.js/scss/vs.scss';\n\n:root {\n --sn-stylekit-font-size-editor: 16px;\n --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo,\n 'Ubuntu Mono', courier, monospace;\n}\n\n@media screen and (max-width: 650px) {\n :root {\n --sn-stylekit-font-size-editor: 18px;\n }\n h1 {\n font-size: 1.75em; // is usually 2em\n }\n}\n\nbody,\nhtml {\n font-family: var(--sn-stylekit-sans-serif-font);\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n font-size: var(--sn-stylekit-base-font-size);\n background-color: transparent;\n}\n\n* {\n // To prevent gray flash when focusing input on mobile Safari\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\nbutton {\n font-family: var(--sn-stylekit-sans-serif-font);\n background-color: transparent;\n}\n\nbutton:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n}\n\nbutton:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n}\n\n.sn-component {\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n //overflow-y: scroll;\n\n .sk-panel.main {\n max-width: 700px;\n width: 100%;\n margin: 10px 5px;\n\n @media screen and (max-width: 725px) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n box-shadow: none;\n margin: 0;\n }\n }\n .sk-panel.main.edit.otherEditor,\n .sk-panel.main.appendix.otherEditor {\n @media screen and (max-width: 725px) {\n border-top: none;\n }\n }\n .sk-panel.main.edit.monacoEditor,\n .sk-panel.main.appendix.monacoEditor {\n max-width: 800px;\n }\n\n .sk-panel-content.view {\n //height: inherit !important;\n //padding: 1.6rem 2rem !important;\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n //width: 700px;\n @media screen and (max-width: 725px) {\n //padding: 0.16rem 0.2rem !important;\n padding: 0px !important;\n }\n }\n\n .sk-panel-content.edit {\n padding: 1rem 1.25rem !important;\n padding-bottom: 0px !important;\n @media screen and (max-width: 725px) {\n //padding: .16rem .2rem !important;\n padding-left: 0px !important;\n padding-right: 0px !important;\n padding-top: 0px !important;\n }\n\n // Hides the horizontal scroll bar when using the Monaco Editor\n // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words\n &.monacoEditor {\n overflow-x: hidden !important;\n }\n }\n\n .sk-input.textarea {\n min-height: 136px;\n padding: 9px 10px;\n max-width: inherit;\n width: calc(100% - 22px);\n height: 100%;\n resize: vertical;\n overflow-y: auto;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n line-height: 1.7;\n }\n\n // This is automatic in Microsoft Edge.\n // We need to make it explicit for Firefox.\n .sk-input.textarea:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n }\n\n .sk-input.textarea.editnote {\n max-height: calc(100% - 32px);\n }\n\n .sk-input.textarea.append {\n max-height: calc(100% - 22px);\n }\n\n .sk-panel-row {\n // used in #appendix\n padding-top: 0.5rem;\n padding-bottom: 0.5rem; // default is 0.4rem top only\n\n .sk-button-group.stretch {\n display: flex;\n justify-content: space-between;\n width: 50%;\n margin-left: auto;\n margin-right: auto;\n }\n }\n}\n\n#header {\n //border-bottom: 0px;\n //border-bottom: 1px solid var(--sn-stylekit-border-color);\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n\n //min-height: 26px;\n padding: 10px 0;\n display: flex;\n flex-direction: column;\n align-items: center; // flex-end;\n\n margin-left: auto;\n margin-right: auto;\n width: 100%;\n\n svg::after {\n content: '';\n background: var(--sn-stylekit-info-color);\n opacity: 0.1;\n }\n\n .sk-button-group {\n max-width: 700px;\n overflow-x: auto;\n padding-left: 2px;\n padding-right: 2px;\n //display: flex;\n //justify-content: space-between;\n //width: 60%;\n\n button {\n border-width: 0px;\n font-size: 16px;\n\n .sk-label {\n font-weight: inherit;\n }\n }\n .sk-button.off {\n opacity: 0.75;\n }\n .sk-button.divider {\n opacity: 0.25;\n cursor: unset;\n margin-right: 0px;\n }\n .sk-button.info.off {\n color: var(--sn-stylekit-info-color);\n background-color: transparent;\n }\n .sk-button.info.off::before {\n background-color: transparent;\n }\n .sk-button.info.off:hover {\n //color: var(--sn-stylekit-info-contrast-color);\n //background-color: var(--sn-stylekit-info-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n .sk-button.info.off::before:hover {\n //background-color: var(--sn-stylekit-info-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n @media screen and (max-width: 450px) {\n #printButton {\n display: none;\n }\n }\n }\n}\n\n#content {\n background-color: var(--sn-stylekit-contrast-background-color);\n flex: 1;\n //padding: 0 10px;\n display: flex;\n justify-content: center;\n\n @media screen and (max-width: 725px) {\n padding: 0;\n }\n}\n\n#content,\n#appendix,\n.DynamicEditor {\n font-size: var(--sn-stylekit-font-size-editor);\n a {\n color: var(--sn-stylekit-info-color); // #086dd6;\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n blockquote {\n margin: 0;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0 1em;\n color: #6a737d;\n border-left: 0.25em solid #dfe2e5;\n }\n\n hr {\n border: 0.5px solid var(--sn-stylekit-border-color);\n }\n\n img {\n max-width: 100%; // 645.500px;\n }\n\n table {\n display: block;\n width: 100%;\n overflow: auto;\n margin-top: 0;\n margin-bottom: 16px;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n background-color: transparent; // #fff;\n border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1;\n }\n\n td,\n th {\n padding: 6px 13px;\n border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5;\n }\n\n tr:nth-child(2n) {\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // #f6f8fa;\n code,\n pre {\n background-color: var(--sn-stylekit-background-color);\n }\n }\n }\n summary {\n .link {\n display: inline;\n color: var(--sn-stylekit-info-color);\n }\n .link:hover {\n text-decoration: underline;\n }\n }\n\n h1,\n h2,\n h3 {\n line-height: normal;\n }\n}\n\n// Exclude CodeMirror\n#appendDynamicEditor,\n#dynamicEditor,\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n#settings,\n.DynamicEditor,\n.rendered-note-section {\n code,\n pre {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .hljs {\n color: var(--sn-stylekit-contrast-foreground-color);\n }\n .hljs-tag {\n color: var(--sn-stylekit-foreground-color);\n }\n\n code {\n box-sizing: border-box;\n word-wrap: break-word;\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);\n border-radius: 3px;\n }\n\n pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode\n color: var(--sn-stylekit-foreground-color);\n border-radius: 3px;\n word-wrap: normal;\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n background-color: transparent;\n border: 0;\n }\n\n pre code {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: initial;\n border: 0;\n }\n}\n\n#errorBoundary,\n#help,\n#intro,\n.rendered-note-section {\n padding: 9px 10px;\n border: 1px transparent;\n border-style: solid;\n margin-left: auto;\n margin-right: auto;\n max-width: 645.5px; //628.700px;\n}\n\n.rendered-note-section {\n height: calc(100% - 20px);\n}\n\n// Same selection plus #renderedNote\n#errorBoundary,\n#help,\n#intro,\n#renderedNote,\n.rendered-section {\n /*align-items: center;\n justify-content: space-between;\n min-width: inherit;\n width: 100%;*/\n word-wrap: break-word;\n overflow-wrap: break-word;\n line-height: 1.7;\n}\n\n#errorBoundary > :nth-child(1),\n#renderedNote > div > :nth-child(1),\n.ProseMirror > :nth-child(2) {\n margin-top: 0px;\n}\n\n.sk-notification {\n // Hacking sk-notification style\n overflow: visible !important; // We need this for the dropdown menu\n margin: 10px 0 0 0 !important;\n //padding: 28px 14px 28px 28px !important;\n padding: 21px 14px 21px 28px !important; //top left bottom right\n}\n\n.note-dialog {\n max-width: 700px;\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 200;\n}\n\n#settings .sk-panel-section:last-child {\n margin-bottom: 0px;\n}\n.sk-panel-section {\n padding-bottom: 0px;\n}\n\n#content .note-dialog,\n.sk-panel.main.settings {\n h1 {\n margin: 0.2em 0px;\n }\n .title-section {\n padding-top: 0px;\n }\n .text-and-undo-button {\n display: flex;\n p,\n .undo-button {\n margin-top: 0px;\n margin-bottom: 0px;\n display: inline;\n }\n }\n button {\n border-width: 0px;\n font-size: 16px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n &.toggle-button {\n padding-left: 0px;\n display: flex;\n }\n .chevron-button,\n .button-caption {\n line-height: 20px;\n margin-top: 5px;\n margin-bottom: 5px;\n }\n .button-caption {\n color: var(--sn-stylekit-foreground-color);\n }\n .sk-label {\n font-weight: normal !important;\n }\n }\n button:hover,\n input[type='checkbox' i]:hover {\n cursor: pointer;\n }\n\n .sk-panel-header {\n .sk-button.info {\n color: var(--sn-stylekit-info-color);\n background-color: transparent;\n }\n .sk-button.info::before {\n background-color: transparent;\n }\n .sk-button.info:hover {\n color: var(--sn-stylekit-info-contrast-color);\n background-color: var(--sn-stylekit-info-color);\n a {\n color: var(--sn-stylekit-info-contrast-color);\n }\n }\n .sk-button.info::before:hover {\n background-color: var(--sn-stylekit-info-color);\n }\n }\n\n .sk-panel-row.settings {\n padding-top: 0.2rem;\n label,\n input,\n select {\n cursor: pointer;\n }\n input,\n select {\n font-size: 16px;\n padding: 0.5rem;\n background-color: var(--sn-stylekit-contrast-background-color);\n border-color: var(--sn-stylekit-border-color);\n color: var(--sn-stylekit-foreground-color);\n }\n input[type='text'] {\n min-width: 250px;\n }\n input[type='checkbox'] {\n min-width: 250px;\n }\n select {\n min-width: 267px;\n }\n .radio {\n margin-top: 3px;\n margin-bottom: 3px;\n }\n textarea {\n // This seems to make the textarea blurry on Firefox\n white-space: pre;\n overflow-x: auto;\n font-family: var(--sn-stylekit-monospace-font);\n }\n // Collapse on mobile\n @media screen and (max-width: 480px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n\n input {\n margin-top: 1rem;\n }\n }\n }\n}\n\n.note-overlay {\n position: fixed !important;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n}\n\n#appendix {\n background-color: var(--sn-stylekit-contrast-background-color);\n display: block;\n\n .sk-button-group {\n display: flex;\n justify-content: space-between;\n width: 50%;\n margin-left: auto;\n margin-right: auto;\n }\n .sk-panel {\n margin-top: 0;\n margin-left: auto;\n margin-right: auto;\n }\n\n .checkBoxForm {\n position: absolute;\n font-size: 13px;\n\n label {\n cursor: pointer;\n }\n padding-left: 25px;\n @media screen and (max-width: 600px) {\n padding-left: 10px;\n }\n @media screen and (max-width: 500px) {\n padding-left: 5px;\n }\n @media screen and (max-width: 455px) {\n label {\n font-size: 12px;\n }\n }\n @media screen and (max-width: 426px) {\n label {\n font-size: 11px;\n }\n }\n @media screen and (max-width: 410px) {\n label {\n font-size: 10px;\n }\n }\n @media screen and (max-width: 388px) {\n label {\n font-size: 9px;\n }\n }\n }\n\n #appendTextButton,\n #scrollToTopButton,\n #scrollToBottomButton {\n border-width: 0px;\n font-size: 14px;\n @media screen and (max-width: 650px) {\n font-size: 17px;\n }\n .sk-label {\n font-weight: inherit;\n }\n }\n\n #scrollToTopButton {\n position: fixed;\n right: 25px;\n bottom: 45px;\n @media screen and (max-width: 725px) {\n right: 15px;\n bottom: 5.2px;\n }\n }\n #scrollToBottomButton {\n position: fixed;\n right: 25px;\n bottom: 10px;\n @media screen and (max-width: 725px) {\n right: 55px;\n bottom: 5.2px;\n }\n }\n}\n\n.MonacoEditorContainer,\n.MonacoDiffEditorContainer {\n min-height: 200px;\n width: calc(100% - 1.5px);\n max-width: inherit;\n max-height: inherit;\n}\n\n.edit .MonacoEditorContainer,\n.edit .MonacoDiffEditorContainer {\n min-height: 200px;\n height: calc(100% - 25px);\n margin-bottom: 25px;\n}\n\n#appendix .MonacoEditorContainer {\n height: 400px;\n}\n\n@import './codemirror.scss';\n@import './dynamicEditor.scss';\n@import './print.scss';\n@import './dark.scss';\n","#content .CodeMirror {\n max-height: calc(100% - 1rem);\n}\n\n#appendix .CodeMirror {\n max-height: calc(100% - 2px);\n}\n\n.CodeMirror {\n //fix : margin left is 30px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n background: inherit;\n color: inherit;\n line-height: 1.7;\n min-height: 8.25em;\n border: 1px solid var(--sn-stylekit-contrast-border-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n\n @media screen and (max-width: 725px) {\n border-top: 1px solid var(--sn-stylekit-border-color);\n }\n .CodeMirror-scroll,\n .CodeMirror-sizer,\n .CodeMirror-gutter,\n .CodeMirror-gutters,\n .CodeMirror-linenumber {\n background: inherit;\n }\n .CodeMirror-linenumber {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .cm-header.cm-header-1 {\n font-size: 2em;\n }\n .cm-header.cm-header-2 {\n font-size: 1.5em;\n }\n .cm-header.cm-header-3 {\n font-size: 1.17em;\n }\n .cm-header.cm-header-4 {\n font-size: 1em;\n }\n .cm-comment {\n background-color: var(--sn-stylekit-contrast-background-color);\n color: var(--sn-stylekit-contrast-foreground-color);\n font-family: var(--sn-stylekit-monospace-font);\n font-size: 85%;\n margin: 0;\n padding: 0.2em 0.4em;\n }\n .cm-comment.CodeMirror-selectedtext,\n .cm-comment.cm-link.CodeMirror-selectedtext {\n background-color: unset;\n }\n .cm-attribute,\n .cm-header {\n color: var(--sn-stylekit-success-color);\n }\n .cm-variable,\n .cm-variable-1,\n .cm-variable-2,\n .cm-variable-3,\n .cm-string-2,\n .cm-tag,\n .cm-tag.cm-bracket {\n color: var(--sn-stylekit-foreground-color);\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n }\n .cm-builtin,\n .cm-string,\n .cm-string.cm-url.cm-variable-2 {\n color: var(--sn-stylekit-warning-color);\n }\n .cm-error {\n color: var(--sn-stylekit-danger-color);\n }\n .cm-link,\n .cm-link.cm-variable-2 {\n color: var(--sn-stylekit-info-color);\n }\n .cm-quote {\n color: #6a737d;\n }\n}\n.cm-link,\n.cm-string,\n.cm-keyword,\n.cm-builtin,\n.cm-number,\n.cm-attribute {\n &.CodeMirror-selectedtext {\n color: var(--sn-stylekit-info-contrast-color);\n background: transparent;\n }\n}\n.CodeMirror-dialog {\n position: fixed;\n background: var(--sn-stylekit-background-color);\n}\n.CodeMirror-cursor {\n border-color: var(--sn-stylekit-info-color);\n}\n.CodeMirror-selected {\n background: var(--sn-stylekit-input-placeholder-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-focused .CodeMirror-selected {\n background: var(--sn-stylekit-info-color);\n color: var(--sn-stylekit-info-contrast-color);\n}\n.CodeMirror-selectedtext {\n background: transparent;\n color: var(--sn-stylekit-info-contrast-color);\n}\n",".DynamicEditor {\n padding: 9px 30px 10px;\n div[class^='sc'] {\n background-color: var(--sn-stylekit-background-color);\n }\n}\nbutton.block-menu-trigger {\n display: none !important;\n}\n@media screen and (min-width: 725px) {\n .DynamicEditor {\n padding: 5px 20px 10px;\n }\n}\n@media screen and (min-width: 600px) {\n .YouTube {\n min-height: 315px;\n min-width: 560px;\n margin: 10px auto;\n display: block;\n }\n}\n\n.ProseMirror {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n}\n","@media print {\n .printURL {\n a[href]:after {\n content: ' (' attr(href) ')';\n }\n }\n\n .sn-component {\n outline: none;\n }\n\n #header,\n #appendix {\n display: none;\n }\n\n .sk-panel.main {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n }\n\n .sk-panel.main.view {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n }\n\n .sk-panel.main.edit,\n .sk-panel.main.appendix {\n display: none;\n background-color: var(--sn-stylekit-background-color);\n }\n\n .content,\n .appendix {\n background-color: var(--sn-stylekit-background-color) !important;\n }\n\n #renderedNote pre code {\n white-space: pre-wrap;\n word-break: break-word;\n }\n}\n\n.sk-panel.main.printModeOn {\n border: 1px var(--sn-stylekit-background-color);\n box-shadow: none;\n}\n\n.sk-panel.main.view.printModeOn {\n max-width: none;\n margin-top: 0px;\n margin-bottom: 0px;\n}\n\n.sk-panel.main.edit.printModeOn,\n.sk-panel.main.appendix.printModeOn {\n background-color: var(--sn-stylekit-background-color);\n}\n\n.content.printModeOn,\n.appendix.printModeOn {\n background-color: var(--sn-stylekit-background-color) !important;\n}\n","@media (prefers-color-scheme: dark) {\n // This is the Midnight theme available here:\n // https://github.com/sn-extensions/midnight-theme\n // Licensed under AGPL-3.0\n :root {\n --primary-bg-color: #292937;\n --secondary-bg-color: #313142;\n --editor-bg-color: #202020;\n --border-color: #13131a;\n --ui-text-color: #d8d8d8;\n\n --sn-stylekit-info-color: #086dd6;\n --sn-stylekit-info-contrast-color: white;\n\n --sn-stylekit-neutral-color: #7c7c7c;\n --sn-stylekit-neutral-contrast-color: white;\n\n --sn-stylekit-success-color: #2b9612;\n --sn-stylekit-success-contrast-color: white;\n\n --sn-stylekit-warning-color: #f6a200;\n --sn-stylekit-warning-contrast-color: white;\n\n --sn-stylekit-danger-color: #f80324;\n --sn-stylekit-danger-contrast-color: white;\n\n --sn-desktop-titlebar-bg-color: var(--primary-bg-color);\n --sn-desktop-titlebar-border-color: var(--border-color);\n --sn-desktop-titlebar-ui-color: var(--ui-text-color);\n --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color);\n\n // StyleKit Vars\n --sn-stylekit-shadow-color: #20202b;\n\n --sn-stylekit-background-color: #20202b;\n --sn-stylekit-border-color: var(--border-color);\n --sn-stylekit-foreground-color: var(--ui-text-color);\n\n --sn-stylekit-contrast-background-color: var(--secondary-bg-color);\n --sn-stylekit-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-contrast-border-color: var(--border-color);\n\n --sn-stylekit-secondary-background-color: #292937;\n --sn-stylekit-secondary-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-border-color: var(--border-color);\n\n --sn-stylekit-secondary-contrast-background-color: #45445a;\n --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-contrast-border-color: var(--border-color);\n\n --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);\n --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);\n\n --sn-stylekit-paragraph-text-color: var(--ui-text-color);\n\n --sn-stylekit-scrollbar-track-border-color: var(--border-color);\n --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color);\n }\n}\n"]} \ No newline at end of file diff --git a/build/static/js/4.b613b891.chunk.js b/build/static/js/4.b613b891.chunk.js deleted file mode 100644 index 7dcee9e6..00000000 --- a/build/static/js/4.b613b891.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 4.b613b891.chunk.js.LICENSE.txt */ -(this["webpackJsonpappend-editor"]=this["webpackJsonpappend-editor"]||[]).push([[4],[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n2?n-2:0),o=2;o1?n-1:0),i=1;i1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:0;Object(o.a)(this,e),this._runner=t,this.priority=n,this._canceled=!1}return Object(a.a)(e,[{key:"dispose",value:function(){this._canceled=!0}},{key:"execute",value:function(){if(!this._canceled)try{this._runner()}catch(e){Object(h.e)(e)}}}],[{key:"sort",value:function(e,t){return t.priority-e.priority}}]),e}();!function(){var e=[],t=null,n=!1,r=!1,i=function(){for(n=!1,t=e,e=[],r=!0;t.length>0;){t.sort(z.sort),t.shift().execute()}r=!1};B=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=new z(t,r);return e.push(o),n||(n=!0,H(i)),o},F=function(e,n){if(r){var i=new z(e,n);return t.push(i),i}return B(e,n)}}();var V=function(e,t){return t},W=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r,i){var a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:V,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:16;Object(o.a)(this,n),a=t.call(this);var c=null,u=0,h=a._register(new d.e),f=function(){u=(new Date).getTime(),i(c),c=null};return a._register(D(e,r,(function(e){c=s(c,e);var t=(new Date).getTime()-u;t>=l?(h.cancel(),f()):h.setIfNotSet(f,l-t)}))),a}return n}(p.a);function G(e,t,n,r,i){return new W(e,t,n,r,i)}function q(e){return document.defaultView.getComputedStyle(e,null)}function K(e){if(e!==document.body)return new $(e.clientWidth,e.clientHeight);if(g.c&&window.visualViewport){var t=window.visualViewport.width,n=window.visualViewport.height-(s.k?24:0);return new $(t,n)}if(window.innerWidth&&window.innerHeight)return new $(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new $(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new $(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}var Y=function(){function e(){Object(o.a)(this,e)}return Object(a.a)(e,null,[{key:"convertToPixels",value:function(e,t){return parseFloat(t)||0}},{key:"getDimension",value:function(t,n,r){var i=q(t),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(n):i.getAttribute(r)),e.convertToPixels(t,o)}},{key:"getBorderLeftWidth",value:function(t){return e.getDimension(t,"border-left-width","borderLeftWidth")}},{key:"getBorderRightWidth",value:function(t){return e.getDimension(t,"border-right-width","borderRightWidth")}},{key:"getBorderTopWidth",value:function(t){return e.getDimension(t,"border-top-width","borderTopWidth")}},{key:"getBorderBottomWidth",value:function(t){return e.getDimension(t,"border-bottom-width","borderBottomWidth")}},{key:"getPaddingLeft",value:function(t){return e.getDimension(t,"padding-left","paddingLeft")}},{key:"getPaddingRight",value:function(t){return e.getDimension(t,"padding-right","paddingRight")}},{key:"getPaddingTop",value:function(t){return e.getDimension(t,"padding-top","paddingTop")}},{key:"getPaddingBottom",value:function(t){return e.getDimension(t,"padding-bottom","paddingBottom")}},{key:"getMarginLeft",value:function(t){return e.getDimension(t,"margin-left","marginLeft")}},{key:"getMarginTop",value:function(t){return e.getDimension(t,"margin-top","marginTop")}},{key:"getMarginRight",value:function(t){return e.getDimension(t,"margin-right","marginRight")}},{key:"getMarginBottom",value:function(t){return e.getDimension(t,"margin-bottom","marginBottom")}}]),e}(),$=function e(t,n){Object(o.a)(this,e),this.width=t,this.height=n};function Q(e){for(var t=e.offsetParent,n=e.offsetTop,r=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var i=ae(e)?null:q(e);i&&(r-="rtl"!==i.direction?e.scrollLeft:-e.scrollLeft),e===t&&(r+=Y.getBorderLeftWidth(e),n+=Y.getBorderTopWidth(e),n+=e.offsetTop,r+=e.offsetLeft,t=e.offsetParent)}return{left:r,top:n}}function Z(e){var t=e.getBoundingClientRect();return{left:t.left+X.scrollX,top:t.top+X.scrollY,width:t.width,height:t.height}}var X=new(function(){function e(){Object(o.a)(this,e)}return Object(a.a)(e,[{key:"scrollX",get:function(){return"number"===typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}},{key:"scrollY",get:function(){return"number"===typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}}]),e}());function J(e){var t=Y.getMarginLeft(e)+Y.getMarginRight(e);return e.offsetWidth+t}function ee(e){var t=Y.getBorderLeftWidth(e)+Y.getBorderRightWidth(e),n=Y.getPaddingLeft(e)+Y.getPaddingRight(e);return e.offsetWidth-t-n}function te(e){var t=Y.getBorderTopWidth(e)+Y.getBorderBottomWidth(e),n=Y.getPaddingTop(e)+Y.getPaddingBottom(e);return e.offsetHeight-t-n}function ne(e){var t=Y.getMarginTop(e)+Y.getMarginBottom(e);return e.offsetHeight+t}function re(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ie(e,t,n){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(k(e,t))return e;if(n)if("string"===typeof n){if(k(e,n))return null}else if(e===n)return null;e=e.parentNode}return null}function oe(e,t,n){return!!ie(e,t,n)}function ae(e){return e&&!!e.host&&!!e.mode}function se(e){return!!le(e)}function le(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return ae(e)?e:null}function ce(){for(var e=document.activeElement;null===e||void 0===e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementsByTagName("head")[0],t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}var de=null;function he(){return de||(de=ue()),de}function fe(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function pe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:he();n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:he();if(t){for(var n=fe(t),r=[],i=0;i=0;a--)t.sheet.deleteRule(r[a])}}function me(e){return"object"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}var ve={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:s.f?"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:s.l?"webkitAnimationStart":"animationstart",ANIMATION_END:s.l?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:s.l?"webkitAnimationIteration":"animationiteration"},_e={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function be(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function ye(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}var Se=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this))._onDidFocus=r._register(new f.a),r.onDidFocus=r._onDidFocus.event,r._onDidBlur=r._register(new f.a),r.onDidBlur=r._onDidBlur.event;var i=re(document.activeElement,e),a=!1,s=function(){a=!1,i||(i=!0,r._onDidFocus.fire())},c=function(){i&&(a=!0,window.setTimeout((function(){a&&(a=!1,i=!1,r._onDidBlur.fire())}),0))};return r._refreshStateHandler=function(){re(document.activeElement,e)!==i&&(i?c():s())},r._register(Object(l.a)(e,ve.FOCUS,!0)(s)),r._register(Object(l.a)(e,ve.BLUR,!0)(c)),r}return n}(p.a);function Ce(e){return new Se(e)}function ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r3?a-3:0),l=3;l2?n-2:0),i=2;i2?n-2:0),i=2;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},function(e,t,n){"use strict";n.d(t,"g",(function(){return h})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"c",(function(){return b}));var r=n(1),i=n(6),o=n(0),a=n(4),s=n(5),l=n(164),c=n(55);function u(e){}var d=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,"Encounter errors while disposing of store. Errors: [".concat(e.join(", "),"]"))).errors=e,r}return n}(Object(l.a)(Error));function h(e){return"function"===typeof e.dispose&&0===e.dispose.length}function f(e){if(c.a.is(e)){var t,n=[],r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o)try{o.dispose()}catch(a){n.push(a)}}}catch(s){r.e(s)}finally{r.f()}if(1===n.length)throw n[0];if(n.length>1)throw new d(n);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function p(){for(var e=arguments.length,t=new Array(e),n=0;ni||t===i&&n>o?(this.startLineNumber=i,this.startColumn=o,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=i,this.endColumn=o)}return Object(i.a)(e,[{key:"isEmpty",value:function(){return e.isEmpty(this)}},{key:"containsPosition",value:function(t){return e.containsPosition(this,t)}},{key:"containsRange",value:function(t){return e.containsRange(this,t)}},{key:"strictContainsRange",value:function(t){return e.strictContainsRange(this,t)}},{key:"plusRange",value:function(t){return e.plusRange(this,t)}},{key:"intersectRanges",value:function(t){return e.intersectRanges(this,t)}},{key:"equalsRange",value:function(t){return e.equalsRange(this,t)}},{key:"getEndPosition",value:function(){return e.getEndPosition(this)}},{key:"getStartPosition",value:function(){return e.getStartPosition(this)}},{key:"toString",value:function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}},{key:"setEndPosition",value:function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}},{key:"setStartPosition",value:function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}},{key:"collapseToStart",value:function(){return e.collapseToStart(this)}}],[{key:"isEmpty",value:function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}},{key:"containsPosition",value:function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}},{key:"containsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}},{key:"strictContainsRange",value:function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}},{key:"plusRange",value:function(t,n){var r,i,o,a;return n.startLineNumbert.endLineNumber?(o=n.endLineNumber,a=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,a=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,a=t.endColumn),new e(r,i,o,a)}},{key:"intersectRanges",value:function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,a=t.endColumn,s=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,u=n.endColumn;return rc?(o=c,a=u):o===c&&(a=Math.min(a,u)),r>o||r===o&&i>a?null:new e(r,i,o,a)}},{key:"equalsRange",value:function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}},{key:"getEndPosition",value:function(e){return new o.a(e.endLineNumber,e.endColumn)}},{key:"getStartPosition",value:function(e){return new o.a(e.startLineNumber,e.startColumn)}},{key:"collapseToStart",value:function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}},{key:"fromPositions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"lift",value:function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}},{key:"isIRange",value:function(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}},{key:"areIntersectingOrTouching",value:function(e,t){return!(e.endLineNumbere.startLineNumber}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"e",(function(){return w})),n.d(t,"c",(function(){return T})),n.d(t,"b",(function(){return x})),n.d(t,"f",(function(){return N})),n.d(t,"o",(function(){return D})),n.d(t,"j",(function(){return L})),n.d(t,"p",(function(){return A})),n.d(t,"q",(function(){return I})),n.d(t,"l",(function(){return R})),n.d(t,"k",(function(){return M})),n.d(t,"r",(function(){return P})),n.d(t,"n",(function(){return j})),n.d(t,"m",(function(){return F})),n.d(t,"d",(function(){return r})),n.d(t,"i",(function(){return H})),n.d(t,"g",(function(){return z})),n.d(t,"h",(function(){return V}));var r,i=n(27),o=n(6),a=n(4),s=n(5),l=n(0),c=n(1),u=n(2),d=n(25),h=n(39),f=n(49),p=n(19),g=n(73),m=n(130),v=n(40),_=n(44),b=n(18),y=n(96),S=n(65),C=n(128),k=n(33),E=function(){function e(t){Object(l.a)(this,e),this.id=t.id,this.precondition=t.precondition,this._kbOpts=t.kbOpts,this._menuOpts=t.menuOpts,this._description=t.description}return Object(c.a)(e,[{key:"register",value:function(){var e=this;if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){var t=this._kbOpts.kbExpr;this.precondition&&(t=t?b.a.and(t,this.precondition):this.precondition),y.a.registerCommandAndKeybindingRule({id:this.id,handler:function(t,n){return e.runCommand(t,n)},weight:this._kbOpts.weight,args:this._kbOpts.args,when:t,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else _.a.registerCommand({id:this.id,handler:function(t,n){return e.runCommand(t,n)},description:this._description})}},{key:"_registerMenuItem",value:function(e){v.d.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon},when:e.when,order:e.order})}}]),e}(),w=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(l.a)(this,n),(e=t.apply(this,arguments))._implementations=[],e}return Object(c.a)(n,[{key:"addImplementation",value:function(e,t){var n=this;return this._implementations.push([e,t]),this._implementations.sort((function(e,t){return t[0]-e[0]})),{dispose:function(){for(var e=0;e1?n-1:0),o=1;o1?n-1:0),o=1;o=0}))},e.getDiffEditorContributions=function(){return B.INSTANCE.getDiffEditorContributions()}}(r||(r={}));var B=function(){function e(){Object(l.a)(this,e),this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}return Object(c.a)(e,[{key:"registerEditorContribution",value:function(e,t){this.editorContributions.push({id:e,ctor:t})}},{key:"getEditorContributions",value:function(){return this.editorContributions.slice(0)}},{key:"getDiffEditorContributions",value:function(){return this.diffEditorContributions.slice(0)}},{key:"registerEditorAction",value:function(e){e.register(),this.editorActions.push(e)}},{key:"getEditorActions",value:function(){return this.editorActions.slice(0)}},{key:"registerEditorCommand",value:function(e){e.register(),this.editorCommands[e.id]=e}},{key:"getEditorCommand",value:function(e){return this.editorCommands[e]||null}}]),e}();function U(e){return e.register(),e}B.INSTANCE=new B,S.a.add("editor.contributions",B.INSTANCE);var H=U(new w({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:v.b.MenubarEditMenu,group:"1_do",title:u.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:v.b.CommandPalette,group:"",title:u.a("undo","Undo"),order:1}]}));U(new O(H,{id:"default:undo",precondition:void 0}));var z=U(new w({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:v.b.MenubarEditMenu,group:"1_do",title:u.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:v.b.CommandPalette,group:"",title:u.a("redo","Redo"),order:1}]}));U(new O(z,{id:"default:redo",precondition:void 0}));var V=U(new w({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:v.b.MenubarSelectionMenu,group:"1_basic",title:u.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:v.b.CommandPalette,group:"",title:u.a("selectAll","Select All"),order:1}]}))},function(e,t,n){"use strict";e.exports=n(437)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"gc",(function(){return p})),n.d(t,"ab",(function(){return g})),n.d(t,"Y",(function(){return m})),n.d(t,"bb",(function(){return v})),n.d(t,"Z",(function(){return _})),n.d(t,"h",(function(){return b})),n.d(t,"b",(function(){return y})),n.d(t,"rc",(function(){return S})),n.d(t,"qc",(function(){return C})),n.d(t,"uc",(function(){return k})),n.d(t,"fb",(function(){return E})),n.d(t,"hb",(function(){return w})),n.d(t,"gb",(function(){return O})),n.d(t,"db",(function(){return T})),n.d(t,"cb",(function(){return x})),n.d(t,"eb",(function(){return N})),n.d(t,"lb",(function(){return D})),n.d(t,"nb",(function(){return L})),n.d(t,"mb",(function(){return A})),n.d(t,"ob",(function(){return I})),n.d(t,"qb",(function(){return R})),n.d(t,"pb",(function(){return M})),n.d(t,"ib",(function(){return P})),n.d(t,"kb",(function(){return j})),n.d(t,"jb",(function(){return F})),n.d(t,"f",(function(){return H})),n.d(t,"e",(function(){return z})),n.d(t,"g",(function(){return V})),n.d(t,"c",(function(){return W})),n.d(t,"d",(function(){return G})),n.d(t,"ic",(function(){return q})),n.d(t,"kc",(function(){return K})),n.d(t,"lc",(function(){return Y})),n.d(t,"jc",(function(){return $})),n.d(t,"cc",(function(){return Q})),n.d(t,"u",(function(){return Z})),n.d(t,"t",(function(){return X})),n.d(t,"T",(function(){return J})),n.d(t,"S",(function(){return ee})),n.d(t,"L",(function(){return te})),n.d(t,"K",(function(){return ne})),n.d(t,"D",(function(){return re})),n.d(t,"C",(function(){return ie})),n.d(t,"s",(function(){return oe})),n.d(t,"B",(function(){return ae})),n.d(t,"U",(function(){return se})),n.d(t,"W",(function(){return le})),n.d(t,"V",(function(){return ce})),n.d(t,"X",(function(){return ue})),n.d(t,"dc",(function(){return de})),n.d(t,"ec",(function(){return he})),n.d(t,"fc",(function(){return fe})),n.d(t,"Yb",(function(){return pe})),n.d(t,"Xb",(function(){return ge})),n.d(t,"O",(function(){return me})),n.d(t,"P",(function(){return ve})),n.d(t,"J",(function(){return _e})),n.d(t,"Q",(function(){return be})),n.d(t,"R",(function(){return ye})),n.d(t,"v",(function(){return Se})),n.d(t,"x",(function(){return Ce})),n.d(t,"z",(function(){return ke})),n.d(t,"w",(function(){return Ee})),n.d(t,"y",(function(){return we})),n.d(t,"A",(function(){return Oe})),n.d(t,"H",(function(){return Te})),n.d(t,"E",(function(){return xe})),n.d(t,"G",(function(){return Ne})),n.d(t,"F",(function(){return De})),n.d(t,"I",(function(){return Le})),n.d(t,"r",(function(){return Ae})),n.d(t,"N",(function(){return Ie})),n.d(t,"M",(function(){return Re})),n.d(t,"j",(function(){return Me})),n.d(t,"k",(function(){return Pe})),n.d(t,"n",(function(){return je})),n.d(t,"p",(function(){return Fe})),n.d(t,"o",(function(){return Be})),n.d(t,"q",(function(){return Ue})),n.d(t,"l",(function(){return He})),n.d(t,"m",(function(){return ze})),n.d(t,"xb",(function(){return Ve})),n.d(t,"yb",(function(){return We})),n.d(t,"rb",(function(){return Ge})),n.d(t,"sb",(function(){return qe})),n.d(t,"Db",(function(){return Ke})),n.d(t,"Eb",(function(){return Ye})),n.d(t,"Cb",(function(){return $e})),n.d(t,"Ab",(function(){return Qe})),n.d(t,"Bb",(function(){return Ze})),n.d(t,"tb",(function(){return Xe})),n.d(t,"zb",(function(){return Je})),n.d(t,"ub",(function(){return et})),n.d(t,"wb",(function(){return tt})),n.d(t,"vb",(function(){return nt})),n.d(t,"tc",(function(){return rt})),n.d(t,"Gb",(function(){return it})),n.d(t,"Hb",(function(){return ot})),n.d(t,"Fb",(function(){return at})),n.d(t,"Kb",(function(){return st})),n.d(t,"Ib",(function(){return lt})),n.d(t,"Jb",(function(){return ct})),n.d(t,"Lb",(function(){return ut})),n.d(t,"oc",(function(){return dt})),n.d(t,"pc",(function(){return ht})),n.d(t,"mc",(function(){return ft})),n.d(t,"nc",(function(){return pt})),n.d(t,"Vb",(function(){return gt})),n.d(t,"Wb",(function(){return mt})),n.d(t,"Ob",(function(){return vt})),n.d(t,"Pb",(function(){return _t})),n.d(t,"Nb",(function(){return bt})),n.d(t,"Tb",(function(){return yt})),n.d(t,"Mb",(function(){return St})),n.d(t,"Rb",(function(){return Ct})),n.d(t,"Sb",(function(){return kt})),n.d(t,"Qb",(function(){return Et})),n.d(t,"Zb",(function(){return wt})),n.d(t,"bc",(function(){return Ot})),n.d(t,"ac",(function(){return Tt})),n.d(t,"i",(function(){return xt})),n.d(t,"sc",(function(){return Dt})),n.d(t,"Ub",(function(){return Lt})),n.d(t,"hc",(function(){return It}));var r=n(6),i=n(0),o=n(1),a=n(65),s=n(23),l=n(12),c=n(2),u=n(270),d=n(32),h={ColorContribution:"base.contributions.colors"},f=new(function(){function e(){Object(i.a)(this,e),this._onDidChangeSchema=new l.a,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}return Object(o.a)(e,[{key:"registerColor",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o={id:e,description:n,defaults:t,needsTransparency:r,deprecationMessage:i};this.colorsById[e]=o;var a={type:"string",description:n,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return i&&(a.deprecationMessage=i),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),this._onDidChangeSchema.fire(),e}},{key:"resolveDefaultColor",value:function(e,t){var n=this.colorsById[e];if(n&&n.defaults)return It(n.defaults[t.type],t)}},{key:"getColorSchema",value:function(){return this.colorSchema}},{key:"toString",value:function(){var e=this;return Object.keys(this.colorsById).sort((function(e,t){var n=-1===e.indexOf(".")?0:1,r=-1===t.indexOf(".")?0:1;return n!==r?n-r:e.localeCompare(t)})).map((function(t){return"- `".concat(t,"`: ").concat(e.colorsById[t].description)})).join("\n")}}]),e}());function p(e,t,n,r,i){return f.registerColor(e,t,n,r,i)}a.a.add(h.ColorContribution,f);var g=p("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},c.a("foreground","Overall foreground color. This color is only used if not overridden by a component.")),m=p("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},c.a("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),v=p("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},c.a("iconForeground","The default color for icons in the workbench.")),_=p("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},c.a("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),b=p("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},c.a("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),y=p("contrastActiveBorder",{light:null,dark:null,hc:_},c.a("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),S=p("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},c.a("textLinkForeground","Foreground color for links in text.")),C=p("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:s.a.black},c.a("textCodeBlockBackground","Background color for code blocks in text.")),k=p("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},c.a("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),E=p("input.background",{dark:"#3C3C3C",light:s.a.white,hc:s.a.black},c.a("inputBoxBackground","Input box background.")),w=p("input.foreground",{dark:g,light:g,hc:g},c.a("inputBoxForeground","Input box foreground.")),O=p("input.border",{dark:null,light:null,hc:b},c.a("inputBoxBorder","Input box border.")),T=p("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:b},c.a("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),x=p("inputOption.activeBackground",{dark:Dt(_,.4),light:Dt(_,.2),hc:s.a.transparent},c.a("inputOption.activeBackground","Background color of activated options in input fields.")),N=p("inputOption.activeForeground",{dark:s.a.white,light:s.a.black,hc:null},c.a("inputOption.activeForeground","Foreground color of activated options in input fields.")),D=p("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:s.a.black},c.a("inputValidationInfoBackground","Input validation background color for information severity.")),L=p("inputValidation.infoForeground",{dark:null,light:null,hc:null},c.a("inputValidationInfoForeground","Input validation foreground color for information severity.")),A=p("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:b},c.a("inputValidationInfoBorder","Input validation border color for information severity.")),I=p("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:s.a.black},c.a("inputValidationWarningBackground","Input validation background color for warning severity.")),R=p("inputValidation.warningForeground",{dark:null,light:null,hc:null},c.a("inputValidationWarningForeground","Input validation foreground color for warning severity.")),M=p("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:b},c.a("inputValidationWarningBorder","Input validation border color for warning severity.")),P=p("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:s.a.black},c.a("inputValidationErrorBackground","Input validation background color for error severity.")),j=p("inputValidation.errorForeground",{dark:null,light:null,hc:null},c.a("inputValidationErrorForeground","Input validation foreground color for error severity.")),F=p("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:b},c.a("inputValidationErrorBorder","Input validation border color for error severity.")),B=p("dropdown.background",{dark:"#3C3C3C",light:s.a.white,hc:s.a.black},c.a("dropdownBackground","Dropdown background.")),U=p("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:s.a.white},c.a("dropdownForeground","Dropdown foreground.")),H=p("button.foreground",{dark:s.a.white,light:s.a.white,hc:s.a.white},c.a("buttonForeground","Button foreground color.")),z=p("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},c.a("buttonBackground","Button background color.")),V=p("button.hoverBackground",{dark:Nt(z,.2),light:xt(z,.2),hc:null},c.a("buttonHoverBackground","Button background color when hovering.")),W=p("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:s.a.black},c.a("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),G=p("badge.foreground",{dark:s.a.white,light:"#333",hc:s.a.white},c.a("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),q=p("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},c.a("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),K=p("scrollbarSlider.background",{dark:s.a.fromHex("#797979").transparent(.4),light:s.a.fromHex("#646464").transparent(.4),hc:Dt(b,.6)},c.a("scrollbarSliderBackground","Scrollbar slider background color.")),Y=p("scrollbarSlider.hoverBackground",{dark:s.a.fromHex("#646464").transparent(.7),light:s.a.fromHex("#646464").transparent(.7),hc:Dt(b,.8)},c.a("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),$=p("scrollbarSlider.activeBackground",{dark:s.a.fromHex("#BFBFBF").transparent(.4),light:s.a.fromHex("#000000").transparent(.6),hc:b},c.a("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Q=p("progressBar.background",{dark:s.a.fromHex("#0E70C0"),light:s.a.fromHex("#0E70C0"),hc:b},c.a("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Z=p("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},c.a("editorError.foreground","Foreground color of error squigglies in the editor.")),X=p("editorError.border",{dark:null,light:null,hc:s.a.fromHex("#E47777").transparent(.8)},c.a("errorBorder","Border color of error boxes in the editor.")),J=p("editorWarning.foreground",{dark:"#CCA700",light:"#E9A700",hc:null},c.a("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ee=p("editorWarning.border",{dark:null,light:null,hc:s.a.fromHex("#FFCC00").transparent(.8)},c.a("warningBorder","Border color of warning boxes in the editor.")),te=p("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},c.a("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ne=p("editorInfo.border",{dark:null,light:null,hc:s.a.fromHex("#75BEFF").transparent(.8)},c.a("infoBorder","Border color of info boxes in the editor.")),re=p("editorHint.foreground",{dark:s.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},c.a("editorHint.foreground","Foreground color of hint squigglies in the editor.")),ie=p("editorHint.border",{dark:null,light:null,hc:s.a.fromHex("#eeeeee").transparent(.8)},c.a("hintBorder","Border color of hint boxes in the editor.")),oe=p("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:s.a.black},c.a("editorBackground","Editor background color.")),ae=p("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:s.a.white},c.a("editorForeground","Editor default foreground color.")),se=p("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},c.a("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),le=p("editorWidget.foreground",{dark:g,light:g,hc:g},c.a("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ce=p("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:b},c.a("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.")),ue=p("editorWidget.resizeBorder",{light:null,dark:null,hc:null},c.a("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.")),de=p("quickInput.background",{dark:se,light:se,hc:se},c.a("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),he=p("quickInput.foreground",{dark:le,light:le,hc:le},c.a("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),fe=p("quickInputTitle.background",{dark:new s.a(new s.c(255,255,255,.105)),light:new s.a(new s.c(0,0,0,.06)),hc:"#000000"},c.a("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),pe=p("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:s.a.white},c.a("pickerGroupForeground","Quick picker color for grouping labels.")),ge=p("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:s.a.white},c.a("pickerGroupBorder","Quick picker color for grouping borders.")),me=p("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},c.a("editorSelectionBackground","Color of the editor selection.")),ve=p("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},c.a("editorSelectionForeground","Color of the selected text for high contrast.")),_e=p("editor.inactiveSelectionBackground",{light:Dt(me,.5),dark:Dt(me,.5),hc:Dt(me,.5)},c.a("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),be=p("editor.selectionHighlightBackground",{light:At(me,oe,.3,.6),dark:At(me,oe,.3,.6),hc:null},c.a("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),ye=p("editor.selectionHighlightBorder",{light:null,dark:null,hc:y},c.a("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Se=p("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},c.a("editorFindMatch","Color of the current search match.")),Ce=p("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},c.a("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),ke=p("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},c.a("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ee=p("editor.findMatchBorder",{light:null,dark:null,hc:y},c.a("editorFindMatchBorder","Border color of the current search match.")),we=p("editor.findMatchHighlightBorder",{light:null,dark:null,hc:y},c.a("findMatchHighlightBorder","Border color of the other search matches.")),Oe=p("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Dt(y,.4)},c.a("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Te=p("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},c.a("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),xe=p("editorHoverWidget.background",{light:se,dark:se,hc:se},c.a("hoverBackground","Background color of the editor hover.")),Ne=p("editorHoverWidget.foreground",{light:le,dark:le,hc:le},c.a("hoverForeground","Foreground color of the editor hover.")),De=p("editorHoverWidget.border",{light:ce,dark:ce,hc:ce},c.a("hoverBorder","Border color of the editor hover.")),Le=p("editorHoverWidget.statusBarBackground",{dark:Nt(xe,.2),light:xt(xe,.05),hc:se},c.a("statusBarBackground","Background color of the editor hover status bar.")),Ae=p("editorLink.activeForeground",{dark:"#4E94CE",light:s.a.blue,hc:s.a.cyan},c.a("activeLinkForeground","Color of active links.")),Ie=p("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},c.a("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Re=p("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},c.a("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),Me=new s.a(new s.c(155,185,85,.2)),Pe=new s.a(new s.c(255,0,0,.2)),je=p("diffEditor.insertedTextBackground",{dark:Me,light:Me,hc:null},c.a("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Fe=p("diffEditor.removedTextBackground",{dark:Pe,light:Pe,hc:null},c.a("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Be=p("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},c.a("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Ue=p("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},c.a("diffEditorRemovedOutline","Outline color for text that got removed.")),He=p("diffEditor.border",{dark:null,light:null,hc:b},c.a("diffEditorBorder","Border color between the two text editors.")),ze=p("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},c.a("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ve=p("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},c.a("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.")),We=p("list.focusForeground",{dark:null,light:null,hc:null},c.a("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.")),Ge=p("list.activeSelectionBackground",{dark:"#094771",light:"#0074E8",hc:null},c.a("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.")),qe=p("list.activeSelectionForeground",{dark:s.a.white,light:s.a.white,hc:null},c.a("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.")),Ke=p("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},c.a("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.")),Ye=p("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},c.a("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.")),$e=p("list.inactiveFocusBackground",{dark:null,light:null,hc:null},c.a("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.")),Qe=p("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},c.a("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Ze=p("list.hoverForeground",{dark:null,light:null,hc:null},c.a("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Xe=p("list.dropBackground",{dark:Ve,light:Ve,hc:null},c.a("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Je=p("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:_},c.a("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),et=p("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:s.a.black},c.a("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),tt=p("listFilterWidget.outline",{dark:s.a.transparent,light:s.a.transparent,hc:"#f38518"},c.a("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),nt=p("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:b},c.a("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),rt=p("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},c.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),it=p("menu.border",{dark:null,light:null,hc:b},c.a("menuBorder","Border color of menus.")),ot=p("menu.foreground",{dark:U,light:g,hc:U},c.a("menuForeground","Foreground color of menu items.")),at=p("menu.background",{dark:B,light:B,hc:B},c.a("menuBackground","Background color of menu items.")),st=p("menu.selectionForeground",{dark:qe,light:qe,hc:qe},c.a("menuSelectionForeground","Foreground color of the selected menu item in menus.")),lt=p("menu.selectionBackground",{dark:Ge,light:Ge,hc:Ge},c.a("menuSelectionBackground","Background color of the selected menu item in menus.")),ct=p("menu.selectionBorder",{dark:null,light:null,hc:y},c.a("menuSelectionBorder","Border color of the selected menu item in menus.")),ut=p("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:b},c.a("menuSeparatorBackground","Color of a separator menu item in menus.")),dt=p("editor.snippetTabstopHighlightBackground",{dark:new s.a(new s.c(124,124,124,.3)),light:new s.a(new s.c(10,50,100,.2)),hc:new s.a(new s.c(124,124,124,.3))},c.a("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),ht=p("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},c.a("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),ft=p("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},c.a("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),pt=p("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s.a(new s.c(10,50,100,.5)),hc:"#525252"},c.a("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),gt=p("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},c.a("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),mt=p("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},c.a("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),vt=p("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},c.a("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),_t=p("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},c.a("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),bt=p("minimap.errorHighlight",{dark:new s.a(new s.c(255,18,18,.7)),light:new s.a(new s.c(255,18,18,.7)),hc:new s.a(new s.c(255,50,50,1))},c.a("minimapError","Minimap marker color for errors.")),yt=p("minimap.warningHighlight",{dark:J,light:J,hc:ee},c.a("overviewRuleWarning","Minimap marker color for warnings.")),St=p("minimap.background",{dark:null,light:null,hc:null},c.a("minimapBackground","Minimap background color.")),Ct=p("minimapSlider.background",{light:Dt(K,.5),dark:Dt(K,.5),hc:Dt(K,.5)},c.a("minimapSliderBackground","Minimap slider background color.")),kt=p("minimapSlider.hoverBackground",{light:Dt(Y,.5),dark:Dt(Y,.5),hc:Dt(Y,.5)},c.a("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Et=p("minimapSlider.activeBackground",{light:Dt($,.5),dark:Dt($,.5),hc:Dt($,.5)},c.a("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),wt=p("problemsErrorIcon.foreground",{dark:Z,light:Z,hc:Z},c.a("problemsErrorIconForeground","The color used for the problems error icon.")),Ot=p("problemsWarningIcon.foreground",{dark:J,light:J,hc:J},c.a("problemsWarningIconForeground","The color used for the problems warning icon.")),Tt=p("problemsInfoIcon.foreground",{dark:te,light:te,hc:te},c.a("problemsInfoIconForeground","The color used for the problems info icon."));function xt(e,t){return function(n){var r=It(e,n);if(r)return r.darken(t)}}function Nt(e,t){return function(n){var r=It(e,n);if(r)return r.lighten(t)}}function Dt(e,t){return function(n){var r=It(e,n);if(r)return r.transparent(t)}}function Lt(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,o=!1;return n=e((function(e){if(!o)return n?n.dispose():o=!0,t.call(r,e)}),null,i),o&&n.dispose(),n}}function n(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){return n.call(r,t(e))}),null,i)}))}function r(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){t(e),n.call(r,e)}),null,i)}))}function i(e,t){return a((function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;return e((function(e){return t(e)&&n.call(r,e)}),null,i)}))}function o(e,t,r){var i=r;return n(e,(function(e){return i=t(i,e)}))}function a(e){var t,n=new m({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function s(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=void 0,s=void 0,l=0,c=new m({leakWarningThreshold:o,onFirstListenerAdd:function(){n=e((function(e){l++,a=t(a,e),i&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var e=a;a=void 0,s=void 0,(!i||l>1)&&c.fire(e),l=0}),r)}))},onLastListenerRemove:function(){n.dispose()}});return c.event}function l(e){var t,n=!0;return i(e,(function(e){var r=n||e!==t;return n=!1,t=e,r}))}e.None=function(){return p.a.None},e.once=t,e.map=n,e.forEach=r,e.filter=i,e.signal=function(e){return e},e.any=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;return p.e.apply(void 0,Object(h.a)(t.map((function(t){return t((function(t){return e.call(n,t)}),null,r)}))))}},e.reduce=o,e.snapshot=a,e.debounce=s,e.stopwatch=function(e){var r=(new Date).getTime();return n(t(e),(function(e){return(new Date).getTime()-r}))},e.latch=l,e.buffer=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=n.slice(),i=e((function(e){r?r.push(e):a.fire(e)})),o=function(){r&&r.forEach((function(e){return a.fire(e)})),r=null},a=new m({onFirstListenerAdd:function(){i||(i=e((function(e){return a.fire(e)})))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i&&i.dispose(),i=null}});return a.event};var c=function(){function e(t){Object(u.a)(this,e),this.event=t}return Object(d.a)(e,[{key:"map",value:function(t){return new e(n(this.event,t))}},{key:"forEach",value:function(t){return new e(r(this.event,t))}},{key:"filter",value:function(t){return new e(i(this.event,t))}},{key:"reduce",value:function(t,n){return new e(o(this.event,t,n))}},{key:"latch",value:function(){return new e(l(this.event))}},{key:"debounce",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return new e(s(this.event,t,n,r,i))}},{key:"on",value:function(e,t,n){return this.event(e,t,n)}},{key:"once",value:function(e,n,r){return t(this.event)(e,n,r)}}]),e}();e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return a.fire(n.apply(void 0,arguments))},i=function(){return e.on(t,r)},o=function(){return e.removeListener(t,r)},a=new m({onFirstListenerAdd:i,onLastListenerRemove:o});return a.event},e.fromDOMEventEmitter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=function(){return a.fire(n.apply(void 0,arguments))},i=function(){return e.addEventListener(t,r)},o=function(){return e.removeEventListener(t,r)},a=new m({onFirstListenerAdd:i,onLastListenerRemove:o});return a.event},e.fromPromise=function(e){var t=new m,n=!1;return e.then(void 0,(function(){return null})).then((function(){n?t.fire(void 0):setTimeout((function(){return t.fire(void 0)}),0)})),n=!0,t.event},e.toPromise=function(e){return new Promise((function(n){return t(e)(n)}))}}(r||(r={}));var m=function(){function e(t){Object(u.a)(this,e),this._disposed=!1,this._options=t,this._leakageMon=void 0}return Object(d.a)(e,[{key:"fire",value:function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new g.a);var t,n=Object(c.a)(this._listeners);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._deliveryQueue.push([r,e])}}catch(u){n.e(u)}finally{n.f()}for(;this._deliveryQueue.size>0;){var i=this._deliveryQueue.shift(),o=Object(l.a)(i,2),a=o[0],s=o[1];try{"function"===typeof a?a.call(void 0,s):a[0].call(a[1],s)}catch(d){Object(f.e)(d)}}}}},{key:"dispose",value:function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}},{key:"event",get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new g.a);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var a,s,l=t._listeners.push(r?[n,r]:n);return o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r),t._leakageMon&&(a=t._leakageMon.check(t._listeners.size)),s={dispose:function(){(a&&a(),s.dispose=e._noop,t._disposed)||(l(),t._options&&t._options.onLastListenerRemove&&(t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)))}},i instanceof p.b?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}}]),e}();m._noop=function(){};var v=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e))._isPaused=0,r._eventQueue=new g.a,r._mergeFn=e&&e.merge,r}return Object(d.a)(n,[{key:"pause",value:function(){this._isPaused++}},{key:"resume",value:function(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){var e=this._eventQueue.toArray();this._eventQueue.clear(),Object(i.a)(Object(o.a)(n.prototype),"fire",this).call(this,this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)Object(i.a)(Object(o.a)(n.prototype),"fire",this).call(this,this._eventQueue.shift())}},{key:"fire",value:function(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):Object(i.a)(Object(o.a)(n.prototype),"fire",this).call(this,e))}}]),n}(m),_=function(){function e(){Object(u.a)(this,e),this.buffers=[]}return Object(d.a)(e,[{key:"wrapEvent",value:function(e){var t=this;return function(n,r,i){return e((function(e){var i=t.buffers[t.buffers.length-1];i?i.push((function(){return n.call(r,e)})):n.call(r,e)}),void 0,i)}}},{key:"bufferEvents",value:function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach((function(e){return e()})),n}}]),e}(),b=function(){function e(){var t=this;Object(u.a)(this,e),this.listening=!1,this.inputEvent=r.None,this.inputEventListener=p.a.None,this.emitter=new m({onFirstListenerDidAdd:function(){t.listening=!0,t.inputEventListener=t.inputEvent(t.emitter.fire,t.emitter)},onLastListenerRemove:function(){t.listening=!1,t.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object(d.a)(e,[{key:"dispose",value:function(){this.inputEventListener.dispose(),this.emitter.dispose()}},{key:"input",set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r,i=n(18);!function(e){e.editorSimpleInput=new i.c("editorSimpleInput",!1),e.editorTextFocus=new i.c("editorTextFocus",!1),e.focus=new i.c("editorFocus",!1),e.textInputFocus=new i.c("textInputFocus",!1),e.readOnly=new i.c("editorReadonly",!1),e.columnSelection=new i.c("editorColumnSelection",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new i.c("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new i.c("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new i.c("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new i.c("isInEmbeddedEditor",!1),e.canUndo=new i.c("canUndo",!1),e.canRedo=new i.c("canRedo",!1),e.hoverVisible=new i.c("editorHoverVisible",!1),e.inCompositeEditor=new i.c("inCompositeEditor",void 0),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new i.c("editorLangId",""),e.hasCompletionItemProvider=new i.c("editorHasCompletionItemProvider",!1),e.hasCodeActionsProvider=new i.c("editorHasCodeActionsProvider",!1),e.hasCodeLensProvider=new i.c("editorHasCodeLensProvider",!1),e.hasDefinitionProvider=new i.c("editorHasDefinitionProvider",!1),e.hasDeclarationProvider=new i.c("editorHasDeclarationProvider",!1),e.hasImplementationProvider=new i.c("editorHasImplementationProvider",!1),e.hasTypeDefinitionProvider=new i.c("editorHasTypeDefinitionProvider",!1),e.hasHoverProvider=new i.c("editorHasHoverProvider",!1),e.hasDocumentHighlightProvider=new i.c("editorHasDocumentHighlightProvider",!1),e.hasDocumentSymbolProvider=new i.c("editorHasDocumentSymbolProvider",!1),e.hasReferenceProvider=new i.c("editorHasReferenceProvider",!1),e.hasRenameProvider=new i.c("editorHasRenameProvider",!1),e.hasSignatureHelpProvider=new i.c("editorHasSignatureHelpProvider",!1),e.hasDocumentFormattingProvider=new i.c("editorHasDocumentFormattingProvider",!1),e.hasDocumentSelectionFormattingProvider=new i.c("editorHasDocumentSelectionFormattingProvider",!1),e.hasMultipleDocumentFormattingProvider=new i.c("editorHasMultipleDocumentFormattingProvider",!1),e.hasMultipleDocumentSelectionFormattingProvider=new i.c("editorHasMultipleDocumentSelectionFormattingProvider",!1)}(r||(r={}))},function(e,t,n){e.exports=n(443)},function(e,t,n){"use strict";n.d(t,"D",(function(){return o})),n.d(t,"M",(function(){return a})),n.d(t,"x",(function(){return l})),n.d(t,"u",(function(){return c})),n.d(t,"v",(function(){return u})),n.d(t,"W",(function(){return d})),n.d(t,"K",(function(){return h})),n.d(t,"Q",(function(){return f})),n.d(t,"p",(function(){return p})),n.d(t,"V",(function(){return g})),n.d(t,"S",(function(){return m})),n.d(t,"s",(function(){return v})),n.d(t,"q",(function(){return _})),n.d(t,"P",(function(){return b})),n.d(t,"O",(function(){return y})),n.d(t,"w",(function(){return S})),n.d(t,"z",(function(){return C})),n.d(t,"J",(function(){return k})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return O})),n.d(t,"i",(function(){return T})),n.d(t,"H",(function(){return x})),n.d(t,"I",(function(){return N})),n.d(t,"t",(function(){return L})),n.d(t,"T",(function(){return I})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return M})),n.d(t,"F",(function(){return P})),n.d(t,"G",(function(){return j})),n.d(t,"j",(function(){return F})),n.d(t,"A",(function(){return B})),n.d(t,"L",(function(){return H})),n.d(t,"N",(function(){return z})),n.d(t,"r",(function(){return V})),n.d(t,"m",(function(){return G})),n.d(t,"k",(function(){return K})),n.d(t,"B",(function(){return $})),n.d(t,"a",(function(){return Q})),n.d(t,"n",(function(){return Z})),n.d(t,"l",(function(){return X})),n.d(t,"E",(function(){return J})),n.d(t,"C",(function(){return ee})),n.d(t,"b",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"o",(function(){return re})),n.d(t,"R",(function(){return ie})),n.d(t,"y",(function(){return oe})),n.d(t,"c",(function(){return ae}));var r=n(0),i=n(1);function o(e){return!e||"string"!==typeof e||0===e.trim().length}function a(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=""+e,i=[r],o=r.length;o1?t-1:0),r=1;r=n.length?e:n[r]}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function u(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=h(e,t);return f(n,t)}function h(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function f(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;-1!==(o=e.lastIndexOf(t,i-1))&&o+n===i;){if(0===o)return"";i=o}return e.substring(0,i)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function g(e){return e.replace(/\*/g,"")}function m(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new Error("Cannot create regex from empty string");t||(e=u(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),n.unicode&&(r+="u"),new RegExp(e,r)}function b(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function y(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function S(e){for(var t=0,n=e.length;t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=t;r1&&void 0!==arguments[1]?arguments[1]:e.length-1,n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1}function E(e,t){return et?1:0}function w(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t.length;ns)return 1}var l=r-n,c=o-i;return lc?1:0}function O(e,t){return T(e,t,0,e.length,0,t.length)}function T(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t.length;nu?1:0}function x(e){return e>=97&&e<=122}function N(e){return e>=65&&e<=90}function D(e){return x(e)||N(e)}function L(e,t){return e.length===t.length&&A(e,t)}function A(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0;re.length)&&A(e,t,n)}function R(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n1){var r=e.charCodeAt(t-2);if(P(r))return F(r,n)}return n}function H(e,t){var n=se.getInstance(),r=t,i=e.length,o=B(e,i,t);t+=o>=65536?2:1;for(var a=n.getGraphemeBreakType(o);t=65536?2:1,a=l}return t-r}function z(e,t){var n=se.getInstance(),r=t,i=U(e,t);t-=i>=65536?2:1;for(var o=n.getGraphemeBreakType(i);t>0;){var a=U(e,t),s=n.getGraphemeBreakType(a);if(ae(s,o))break;t-=a>=65536?2:1,o=s}return r-t}function V(e){for(var t=e.byteLength,n=[],r=0;r=240&&r+3>>0|(63&e[r++])<<12>>>0|(63&e[r++])<<6>>>0|(63&e[r++])<<0>>>0:i>=224&&r+2>>0|(63&e[r++])<<6>>>0|(63&e[r++])<<0>>>0:i>=192&&r+1>>0|(63&e[r++])<<0>>>0:e[r++])>=0&&o<=55295||o>=57344&&o<=65535)n.push(String.fromCharCode(o));else if(o>=65536&&o<=1114111){var a=o-65536,s=55296+((1047552&a)>>>10),l=56320+((1023&a)>>>0);n.push(String.fromCharCode(s)),n.push(String.fromCharCode(l))}else n.push(String.fromCharCode(65533))}return n.join("")}var 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 G(e){return W.test(e)}var q=/(?:[\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 K(e){return q.test(e)}var Y=/^[\t\n\r\x20-\x7E]*$/;function $(e){return Y.test(e)}var Q=/[\u2028\u2029]/;function Z(e){return Q.test(e)}function X(e){for(var t=0,n=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function ee(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}var te=String.fromCharCode(65279);function ne(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function re(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ie(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function oe(e){return se.getInstance().getGraphemeBreakType(e)}function ae(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)))))))))}var se=function(){function e(){Object(r.a)(this,e),this._data=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]")}return Object(i.a)(e,[{key:"getGraphemeBreakType",value:function(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;for(var t=this._data,n=t.length/3,r=1;r<=n;)if(et[3*r+1]))return t[3*r+2];r=2*r+1}return 0}}],[{key:"getInstance",value:function(){return e._INSTANCE||(e._INSTANCE=new e),e._INSTANCE}}]),e}();se._INSTANCE=null},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(16);function i(e,t,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return x})),n.d(t,"b",(function(){return N})),n.d(t,"d",(function(){return D}));var r=n(4),i=n(5),o=n(27),a=n(6),s=n(0),l=n(1),c=n(15),u=n(29),d=n(21),h=new Map;h.set("false",!1),h.set("true",!0),h.set("isMac",d.f),h.set("isLinux",d.d),h.set("isWindows",d.i),h.set("isWeb",d.h),h.set("isMacNative",d.f&&!d.h);var f=Object.prototype.hasOwnProperty,p=function(){function e(){Object(s.a)(this,e)}return Object(l.a)(e,null,[{key:"has",value:function(e){return _.create(e)}},{key:"equals",value:function(e,t){return b.create(e,t)}},{key:"regex",value:function(e,t){return E.create(e,t)}},{key:"not",value:function(e){return k.create(e)}},{key:"and",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]&&arguments[1];if(e)return this._deserializeOrExpression(e,t)}},{key:"_deserializeOrExpression",value:function(e,t){var n=this,r=e.split("||");return T.create(r.map((function(e){return n._deserializeAndExpression(e,t)})))}},{key:"_deserializeAndExpression",value:function(e,t){var n=this,r=e.split("&&");return O.create(r.map((function(e){return n._deserializeOne(e,t)})))}},{key:"_deserializeOne",value:function(e,t){if((e=e.trim()).indexOf("!=")>=0){var n=e.split("!=");return C.create(n[0].trim(),this._deserializeValue(n[1],t))}if(e.indexOf("==")>=0){var r=e.split("==");return b.create(r[0].trim(),this._deserializeValue(r[1],t))}if(e.indexOf("=~")>=0){var i=e.split("=~");return E.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){var o=e.split(" in ");return y.create(o[0].trim(),o[1].trim())}return/^\!\s*/.test(e)?k.create(e.substr(1).trim()):_.create(e)}},{key:"_deserializeValue",value:function(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var n=/^'([^']*)'$/.exec(e);return n?n[1].trim():e}},{key:"_deserializeRegexValue",value:function(e,t){if(Object(c.D)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var n=e.indexOf("/"),r=e.lastIndexOf("/");if(n===r||n<0){if(t)throw new Error("bad regexp-value '".concat(e,"', missing /-enclosure"));return console.warn("bad regexp-value '".concat(e,"', missing /-enclosure")),null}var i=e.slice(n+1,r),o="i"===e[r+1]?"i":"";try{return new RegExp(i,o)}catch(a){if(t)throw new Error("bad regexp-value '".concat(e,"', parse error: ").concat(a));return console.warn("bad regexp-value '".concat(e,"', parse error: ").concat(a)),null}}}]),e}();function g(e,t){return e.cmp(t)}var m=function(){function e(){Object(s.a)(this,e),this.type=0}return Object(l.a)(e,[{key:"cmp",value:function(e){return this.type-e.type}},{key:"equals",value:function(e){return e.type===this.type}},{key:"evaluate",value:function(e){return!1}},{key:"serialize",value:function(){return"false"}},{key:"keys",value:function(){return[]}},{key:"negate",value:function(){return v.INSTANCE}}]),e}();m.INSTANCE=new m;var v=function(){function e(){Object(s.a)(this,e),this.type=1}return Object(l.a)(e,[{key:"cmp",value:function(e){return this.type-e.type}},{key:"equals",value:function(e){return e.type===this.type}},{key:"evaluate",value:function(e){return!0}},{key:"serialize",value:function(){return"true"}},{key:"keys",value:function(){return[]}},{key:"negate",value:function(){return m.INSTANCE}}]),e}();v.INSTANCE=new v;var _=function(){function e(t){Object(s.a)(this,e),this.key=t,this.type=2}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}},{key:"equals",value:function(e){return e.type===this.type&&this.key===e.key}},{key:"evaluate",value:function(e){return!!e.getValue(this.key)}},{key:"serialize",value:function(){return this.key}},{key:"keys",value:function(){return[this.key]}},{key:"negate",value:function(){return k.create(this.key)}}],[{key:"create",value:function(t){var n=h.get(t);return"boolean"===typeof n?n?v.INSTANCE:m.INSTANCE:new e(t)}}]),e}(),b=function(){function e(t,n){Object(s.a)(this,e),this.key=t,this.value=n,this.type=4}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}},{key:"equals",value:function(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}},{key:"evaluate",value:function(e){return e.getValue(this.key)==this.value}},{key:"serialize",value:function(){return this.key+" == '"+this.value+"'"}},{key:"keys",value:function(){return[this.key]}},{key:"negate",value:function(){return C.create(this.key,this.value)}}],[{key:"create",value:function(t,n){if("boolean"===typeof n)return n?_.create(t):k.create(t);var r=h.get(t);return"boolean"===typeof r?n===(r?"true":"false")?v.INSTANCE:m.INSTANCE:new e(t,n)}}]),e}(),y=function(){function e(t,n){Object(s.a)(this,e),this.key=t,this.valueKey=n,this.type=10}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valueKeye.valueKey?1:0}},{key:"equals",value:function(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}},{key:"evaluate",value:function(e){var t=e.getValue(this.valueKey),n=e.getValue(this.key);return Array.isArray(t)?t.indexOf(n)>=0:"string"===typeof n&&"object"===typeof t&&null!==t&&f.call(t,n)}},{key:"serialize",value:function(){return this.key+" in '"+this.valueKey+"'"}},{key:"keys",value:function(){return[this.key,this.valueKey]}},{key:"negate",value:function(){return S.create(this)}}],[{key:"create",value:function(t,n){return new e(t,n)}}]),e}(),S=function(){function e(t){Object(s.a)(this,e),this._actual=t,this.type=11}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}},{key:"equals",value:function(e){return e.type===this.type&&this._actual.equals(e._actual)}},{key:"evaluate",value:function(e){return!this._actual.evaluate(e)}},{key:"serialize",value:function(){throw new Error("Method not implemented.")}},{key:"keys",value:function(){return this._actual.keys()}},{key:"negate",value:function(){return this._actual}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),C=function(){function e(t,n){Object(s.a)(this,e),this.key=t,this.value=n,this.type=5}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:this.valuee.value?1:0}},{key:"equals",value:function(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}},{key:"evaluate",value:function(e){return e.getValue(this.key)!=this.value}},{key:"serialize",value:function(){return this.key+" != '"+this.value+"'"}},{key:"keys",value:function(){return[this.key]}},{key:"negate",value:function(){return b.create(this.key,this.value)}}],[{key:"create",value:function(t,n){if("boolean"===typeof n)return n?k.create(t):_.create(t);var r=h.get(t);return"boolean"===typeof r?n===(r?"true":"false")?m.INSTANCE:v.INSTANCE:new e(t,n)}}]),e}(),k=function(){function e(t){Object(s.a)(this,e),this.key=t,this.type=3}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this.keye.key?1:0}},{key:"equals",value:function(e){return e.type===this.type&&this.key===e.key}},{key:"evaluate",value:function(e){return!e.getValue(this.key)}},{key:"serialize",value:function(){return"!"+this.key}},{key:"keys",value:function(){return[this.key]}},{key:"negate",value:function(){return _.create(this.key)}}],[{key:"create",value:function(t){var n=h.get(t);return"boolean"===typeof n?n?m.INSTANCE:v.INSTANCE:new e(t)}}]),e}(),E=function(){function e(t,n){Object(s.a)(this,e),this.key=t,this.regexp=n,this.type=7}return Object(l.a)(e,[{key:"cmp",value:function(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0}},{key:"equals",value:function(e){if(e.type===this.type){var t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}},{key:"evaluate",value:function(e){var t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}},{key:"serialize",value:function(){var e=this.regexp?"/".concat(this.regexp.source,"/").concat(this.regexp.ignoreCase?"i":""):"/invalid/";return"".concat(this.key," =~ ").concat(e)}},{key:"keys",value:function(){return[this.key]}},{key:"negate",value:function(){return w.create(this)}}],[{key:"create",value:function(t,n){return new e(t,n)}}]),e}(),w=function(){function e(t){Object(s.a)(this,e),this._actual=t,this.type=8}return Object(l.a)(e,[{key:"cmp",value:function(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}},{key:"equals",value:function(e){return e.type===this.type&&this._actual.equals(e._actual)}},{key:"evaluate",value:function(e){return!this._actual.evaluate(e)}},{key:"serialize",value:function(){throw new Error("Method not implemented.")}},{key:"keys",value:function(){return this._actual.keys()}},{key:"negate",value:function(){return this._actual}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),O=function(){function e(t){Object(s.a)(this,e),this.expr=t,this.type=6}return Object(l.a)(e,[{key:"cmp",value:function(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(var t=0,n=this.expr.length;t1;){if("break"===c())break}return new e(r)}}}]),e}(),T=function(){function e(t){Object(s.a)(this,e),this.expr=t,this.type=9}return Object(l.a)(e,[{key:"cmp",value:function(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(var t=0,n=this.expr.length;t1;){var o,s=t.shift(),l=t.shift(),c=[],u=Object(a.a)(i(s));try{for(u.s();!(o=u.n()).done;){var d,h=o.value,f=Object(a.a)(i(l));try{for(f.s();!(d=f.n()).done;){var g=d.value;c.push(p.and(h,g))}}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}t.unshift(p.or.apply(p,c))}return t[0]}}],[{key:"create",value:function(t){var n=e._normalizeArr(t);if(0!==n.length)return 1===n.length?n[0]:new e(n)}},{key:"_normalizeArr",value:function(e){var t=[],n=!1;if(e){for(var r=0,i=e.length;r0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return t===this.lineNumber&&n===this.column?this:new e(t,n)}},{key:"delta",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}},{key:"equals",value:function(t){return e.equals(this,t)}},{key:"isBefore",value:function(t){return e.isBefore(this,t)}},{key:"isBeforeOrEqual",value:function(t){return e.isBeforeOrEqual(this,t)}},{key:"clone",value:function(){return new e(this.lineNumber,this.column)}},{key:"toString",value:function(){return"("+this.lineNumber+","+this.column+")"}}],[{key:"equals",value:function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}},{key:"isBefore",value:function(e,t){return e.lineNumbero&&(o=l)}}catch(_){a.e(_)}finally{a.f()}return o}if("string"===typeof e)return r?"*"===e?5:e===n?10:0:0;if(e){var c=e.language,f=e.pattern,p=e.scheme,g=e.hasAccessToAllModels;if(!r&&!g)return 0;var m=0;if(p)if(p===t.scheme)m=10;else{if("*"!==p)return 0;m=5}if(c)if(c===n)m=10;else{if("*"!==c)return 0;m=Math.max(m,5)}if(f){var v;if((v="string"===typeof f?f:Object.assign(Object.assign({},f),{base:Object(d.d)(f.base)}))!==t.fsPath&&!Object(u.a)(v,t.fsPath))return 0;m=10}return m}return 0}var f=n(73);function p(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(p):!!e.exclusive)}var g,m,v,_=function(){function e(){Object(i.a)(this,e),this._clock=0,this._entries=[],this._onDidChange=new l.a}return Object(r.a)(e,[{key:"register",value:function(e,t){var n=this,r={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(r),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(c.h)((function(){if(r){var e=n._entries.indexOf(r);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),r=void 0)}}))}},{key:"has",value:function(e){return this.all(e).length>0}},{key:"all",value:function(e){if(!e)return[];this._updateScores(e);var t,n=[],r=Object(s.a)(this._entries);try{for(r.s();!(t=r.n()).done;){var i=t.value;i._score>0&&n.push(i.provider)}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"ordered",value:function(e){var t=[];return this._orderedForEach(e,(function(e){return t.push(e.provider)})),t}},{key:"orderedGroups",value:function(e){var t,n,r=[];return this._orderedForEach(e,(function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],r.push(t))})),r}},{key:"_orderedForEach",value:function(e,t){if(e){this._updateScores(e);var n,r=Object(s.a)(this._entries);try{for(r.s();!(n=r.n()).done;){var i=n.value;i._score>0&&t(i)}}catch(o){r.e(o)}finally{r.f()}}}},{key:"_updateScores",value:function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;var r,i=Object(s.a)(this._entries);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o._score=h(o.selector,t.uri,t.getLanguageIdentifier().language,Object(f.b)(t)),p(o.selector)&&o._score>0){var a,l=Object(s.a)(this._entries);try{for(l.s();!(a=l.n()).done;){a.value._score=0}}catch(c){l.e(c)}finally{l.f()}o._score=1e3;break}}}catch(c){i.e(c)}finally{i.f()}this._entries.sort(e._compareByScoreAndTime)}}},{key:"onDidChange",get:function(){return this._onDidChange.event}}],[{key:"_compareByScoreAndTime",value:function(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}]),e}(),b=function(){function e(){Object(i.a)(this,e),this._map=new Map,this._promises=new Map,this._onDidChange=new l.a,this.onDidChange=this._onDidChange.event,this._colorMap=null}return Object(r.a)(e,[{key:"fire",value:function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}},{key:"register",value:function(e,t){var n=this;return this._map.set(e,t),this.fire([e]),Object(c.h)((function(){n._map.get(e)===t&&(n._map.delete(e),n.fire([e]))}))}},{key:"registerPromise",value:function(e,t){var n=this,r=null,i=!1;return this._promises.set(e,t.then((function(t){n._promises.delete(e),!i&&t&&(r=n.register(e,t))}))),Object(c.h)((function(){i=!0,r&&r.dispose()}))}},{key:"getPromise",value:function(e){var t=this,n=this.get(e);if(n)return Promise.resolve(n);var r=this._promises.get(e);return r?r.then((function(n){return t.get(e)})):null}},{key:"get",value:function(e){return this._map.get(e)||null}},{key:"setColorMap",value:function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}},{key:"getColorMap",value:function(){return this._colorMap}},{key:"getDefaultBackground",value:function(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}]),e}(),y=n(26),S=function e(t,n){Object(i.a)(this,e),this.language=t,this.id=n},C=function(){function e(){Object(i.a)(this,e)}return Object(r.a)(e,null,[{key:"getLanguageId",value:function(e){return(255&e)>>>0}},{key:"getTokenType",value:function(e){return(1792&e)>>>8}},{key:"getFontStyle",value:function(e){return(14336&e)>>>11}},{key:"getForeground",value:function(e){return(8372224&e)>>>14}},{key:"getBackground",value:function(e){return(4286578688&e)>>>23}},{key:"getClassNameFromMetadata",value:function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t}},{key:"getInlineStyleFromMetadata",value:function(e,t){var n=this.getForeground(e),r=this.getFontStyle(e),i="color: ".concat(t[n],";");return 1&r&&(i+="font-style: italic;"),2&r&&(i+="font-weight: bold;"),4&r&&(i+="text-decoration: underline;"),i}}]),e}(),k=function(){var e=Object.create(null);return 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(t){var n=e[t],r=n&&y.c.get(n);return r||(console.info("No codicon found for CompletionItemKind "+t),r=y.a.symbolProperty),r.classNames}}(),E=function(){var e=Object.create(null);return 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,function(t,n){var r=e[t];return"undefined"!==typeof r||n||(r=9),r}}();function w(e){return e&&o.a.isUri(e.uri)&&a.a.isIRange(e.range)&&(a.a.isIRange(e.originSelectionRange)||a.a.isIRange(e.targetSelectionRange))}!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(g||(g={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(m||(m={})),function(e){var 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);var n=new Map;n.set(0,"file"),n.set(1,"module"),n.set(2,"namespace"),n.set(3,"package"),n.set(4,"class"),n.set(5,"method"),n.set(6,"property"),n.set(7,"field"),n.set(8,"constructor"),n.set(9,"enum"),n.set(10,"interface"),n.set(11,"function"),n.set(12,"variable"),n.set(13,"constant"),n.set(14,"string"),n.set(15,"number"),n.set(16,"boolean"),n.set(17,"array"),n.set(18,"object"),n.set(19,"key"),n.set(20,"null"),n.set(21,"enum-member"),n.set(22,"struct"),n.set(23,"event"),n.set(24,"operator"),n.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return n.get(e)},e.toCssClassName=function(e,t){var r=n.get(e),i=r&&y.c.get("symbol-"+r);return i||(console.info("No codicon found for SymbolKind "+e),i=y.a.symbolProperty),"".concat(t?"inline":"block"," ").concat(i.classNames)}}(v||(v={}));var O=function e(t){Object(i.a)(this,e),this.value=t};O.Comment=new O("comment"),O.Imports=new O("imports"),O.Region=new O("region");var T=new _,x=new _,N=new _,D=new _,L=new _,A=new _,I=new _,R=new _,M=new _,P=new _,j=new _,F=new _,B=new _,U=new _,H=new _,z=new _,V=new _,W=new _,G=new _,q=new _,K=new _,Y=new _,$=new _,Q=new b},function(e,t,n){"use strict";(function(e,r){n.d(t,"i",(function(){return m})),n.d(t,"f",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return y})),n.d(t,"c",(function(){return S})),n.d(t,"b",(function(){return C})),n.d(t,"j",(function(){return k})),n.d(t,"a",(function(){return E})),n.d(t,"e",(function(){return T}));var i="en",o=!1,a=!1,s=!1,l=!1,c=!1,u=!1,d=void 0,h="undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.electron&&"renderer"===e.type;if("object"!==typeof navigator||h){if("object"===typeof e){o="win32"===e.platform,a="darwin"===e.platform,s="linux"===e.platform,i,i;var f=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).VSCODE_NLS_CONFIG;if(f)try{var p=JSON.parse(f),g=p.availableLanguages["*"];p.locale,g||i,p._translationsConfigFile}catch(x){}l=!0}}else o=(d=navigator.userAgent).indexOf("Windows")>=0,a=d.indexOf("Macintosh")>=0,u=(d.indexOf("Macintosh")>=0||d.indexOf("iPad")>=0||d.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,s=d.indexOf("Linux")>=0,c=!0,navigator.language;var m=o,v=a,_=s,b=l,y=c,S=u,C="object"===typeof self?self:"object"===typeof r?r:{},k=function(){if(C.setImmediate)return C.setImmediate.bind(C);if("function"===typeof C.postMessage&&!C.importScripts){var t=[];C.addEventListener("message",(function(e){if(e.data&&e.data.vscodeSetImmediateId)for(var n=0,r=t.length;n3&&void 0!==arguments[3]?arguments[3]:1;Object(r.a)(this,e),this.r=0|Math.min(255,Math.max(0,t)),this.g=0|Math.min(255,Math.max(0,n)),this.b=0|Math.min(255,Math.max(0,i)),this.a=o(Math.max(Math.min(1,a),0),3)}return Object(i.a)(e,null,[{key:"equals",value:function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}]),e}(),s=function(){function e(t,n,i,a){Object(r.a)(this,e),this.h=0|Math.max(Math.min(360,t),0),this.s=o(Math.max(Math.min(1,n),0),3),this.l=o(Math.max(Math.min(1,i),0),3),this.a=o(Math.max(Math.min(1,a),0),3)}return Object(i.a)(e,null,[{key:"equals",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}},{key:"fromRGBA",value:function(t){var n=t.r/255,r=t.g/255,i=t.b/255,o=t.a,a=Math.max(n,r,i),s=Math.min(n,r,i),l=0,c=0,u=(s+a)/2,d=a-s;if(d>0){switch(c=Math.min(u<=.5?d/(2*u):d/(2-2*u),1),a){case n:l=(r-i)/d+(r1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}},{key:"toRGBA",value:function(t){var n,r,i,o=t.h/360,s=t.s,l=t.l,c=t.a;if(0===s)n=r=i=l;else{var u=l<.5?l*(1+s):l+s-l*s,d=2*l-u;n=e._hue2rgb(d,u,o+1/3),r=e._hue2rgb(d,u,o),i=e._hue2rgb(d,u,o-1/3)}return new a(Math.round(255*n),Math.round(255*r),Math.round(255*i),c)}}]),e}(),l=function(){function e(t,n,i,a){Object(r.a)(this,e),this.h=0|Math.max(Math.min(360,t),0),this.s=o(Math.max(Math.min(1,n),0),3),this.v=o(Math.max(Math.min(1,i),0),3),this.a=o(Math.max(Math.min(1,a),0),3)}return Object(i.a)(e,null,[{key:"equals",value:function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}},{key:"fromRGBA",value:function(t){var n,r=t.r/255,i=t.g/255,o=t.b/255,a=Math.max(r,i,o),s=a-Math.min(r,i,o),l=0===a?0:s/a;return n=0===s?0:a===r?((i-o)/s%6+6)%6:a===i?(o-r)/s+2:(r-i)/s+4,new e(Math.round(60*n),l,a,t.a)}},{key:"toRGBA",value:function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=r*n,s=o*(1-Math.abs(t/60%2-1)),l=r-o,c=0,u=0,d=0;return t<60?(c=o,u=s):t<120?(c=s,u=o):t<180?(u=o,d=s):t<240?(u=s,d=o):t<300?(c=s,d=o):t<360&&(c=o,d=s),c=Math.round(255*(c+l)),u=Math.round(255*(u+l)),d=Math.round(255*(d+l)),new a(c,u,d,i)}}]),e}(),c=function(){function e(t){if(Object(r.a)(this,e),!t)throw new Error("Color needs a value");if(t instanceof a)this.rgba=t;else if(t instanceof s)this._hsla=t,this.rgba=s.toRGBA(t);else{if(!(t instanceof l))throw new Error("Invalid color ctor argument");this._hsva=t,this.rgba=l.toRGBA(t)}}return Object(i.a)(e,[{key:"equals",value:function(e){return!!e&&a.equals(this.rgba,e.rgba)&&s.equals(this.hsla,e.hsla)&&l.equals(this.hsva,e.hsva)}},{key:"getRelativeLuminance",value:function(){return o(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)}},{key:"isLighter",value:function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}},{key:"isLighterThan",value:function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}},{key:"isDarkerThan",value:function(e){return this.getRelativeLuminance()1&&void 0!==arguments[1]&&arguments[1];return r&&1===t.rgba.a?e.Format.CSS.formatHex(t):"#".concat(n(t.rgba.r)).concat(n(t.rgba.g)).concat(n(t.rgba.b)).concat(n(Math.round(255*t.rgba.a)))},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parseHex=function(t){var n=t.length;if(0===n)return null;if(35!==t.charCodeAt(0))return null;if(7===n){var i=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),o=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),s=16*r(t.charCodeAt(5))+r(t.charCodeAt(6));return new e(new a(i,o,s,1))}if(9===n){var l=16*r(t.charCodeAt(1))+r(t.charCodeAt(2)),c=16*r(t.charCodeAt(3))+r(t.charCodeAt(4)),u=16*r(t.charCodeAt(5))+r(t.charCodeAt(6)),d=16*r(t.charCodeAt(7))+r(t.charCodeAt(8));return new e(new a(l,c,u,d/255))}if(4===n){var h=r(t.charCodeAt(1)),f=r(t.charCodeAt(2)),p=r(t.charCodeAt(3));return new e(new a(16*h+h,16*f+f,16*p+p))}if(5===n){var g=r(t.charCodeAt(1)),m=r(t.charCodeAt(2)),v=r(t.charCodeAt(3)),_=r(t.charCodeAt(4));return new e(new a(16*g+g,16*m+m,16*v+v,(16*_+_)/255))}return null}}(t.CSS||(t.CSS={}))}(e.Format||(e.Format={}))}(c||(c={}))},function(e,t,n){"use strict";n.d(t,"t",(function(){return o})),n.d(t,"u",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"p",(function(){return u})),n.d(t,"m",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"n",(function(){return p})),n.d(t,"o",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return v})),n.d(t,"j",(function(){return _})),n.d(t,"i",(function(){return b})),n.d(t,"k",(function(){return y})),n.d(t,"l",(function(){return S})),n.d(t,"s",(function(){return C})),n.d(t,"a",(function(){return k})),n.d(t,"r",(function(){return E})),n.d(t,"q",(function(){return w})),n.d(t,"b",(function(){return O}));var r=n(27),i=n(6);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[e.length-(1+t)]}function a(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e,t){return e===t};if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var r=0,i=e.length;r0))return o;i=o-1}}return-(r+1)}function c(e,t){var n=0,r=e.length;if(0===r)return 0;for(;nr?e[c]=o[s++]:s>i?e[c]=o[a++]:t(o[s],o[a])<0?e[c]=o[s++]:e[c]=o[a++]}(e,t,n,o,r,i)}}function h(e,t){var n,r=[],o=void 0,a=Object(i.a)(u(e.slice(0),t));try{for(a.s();!(n=a.n()).done;){var s=n.value;o&&0===t(o[0],s)?o.push(s):(o=[s],r.push(o))}}catch(l){a.e(l)}finally{a.f()}return r}function f(e){return e.filter((function(e){return!!e}))}function p(e){return!Array.isArray(e)||0===e.length}function g(e){return Array.isArray(e)&&e.length>0}function m(e,t){if(!t)return e.filter((function(t,n){return e.indexOf(t)===n}));var n=Object.create(null);return e.filter((function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)}))}function v(e){var t=new Set;return e.filter((function(e){return!t.has(e)&&(t.add(e),!0)}))}function _(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:void 0,r=_(e,t);return r<0?n:e[r]}function y(e,t){return e.length>0?e[0]:t}function S(e){var t;return(t=[]).concat.apply(t,Object(r.a)(e))}function C(e,t){var n="number"===typeof t?e:0;"number"===typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(var i=n;it;o--)r.push(o);return r}function k(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}function E(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))}function w(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}function O(e){return Array.isArray(e)?e:[e]}},function(e,t,n){"use strict";n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return f}));var r=n(0),i=n(1),o=new(function(){function e(){Object(r.a)(this,e),this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return Object(i.a)(e,[{key:"emit",value:function(e){this.listeners.forEach((function(t){t(e)}))}},{key:"onUnexpectedError",value:function(e){this.unexpectedErrorHandler(e),this.emit(e)}},{key:"onUnexpectedExternalError",value:function(e){this.unexpectedErrorHandler(e)}}]),e}());function a(e){u(e)||o.onUnexpectedError(e)}function s(e){u(e)||o.onUnexpectedExternalError(e)}function l(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}var c="Canceled";function u(e){return e instanceof Error&&e.name===c&&e.message===c}function d(){var e=new Error(c);return e.name=e.message,e}function h(e){return e?new Error("Illegal argument: ".concat(e)):new Error("Illegal argument")}function f(e){return e?new Error("Illegal state: ".concat(e)):new Error("Illegal state")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"f",(function(){return m})),n.d(t,"h",(function(){return _}));var r=n(0),i=n(1),o=n(168),a=n(12),s=new(function(){function e(){Object(r.a)(this,e),this._icons=new Map,this._onDidRegister=new a.a}return Object(i.a)(e,[{key:"add",value:function(e){this._icons.has(e.id)?console.error("Duplicate registration of codicon ".concat(e.id)):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}},{key:"get",value:function(e){return this._icons.get(e)}},{key:"all",get:function(){return this._icons.values()}},{key:"onDidRegister",get:function(){return this._onDidRegister.event}}]),e}()),l=s;function c(e,t,n){return new u(e,t)}var u=function(){function e(t,n,i){Object(r.a)(this,e),this.id=t,this.definition=n,this.description=i,s.add(this)}return Object(i.a)(e,[{key:"classNames",get:function(){return"codicon codicon-"+this.id}},{key:"cssSelector",get:function(){return".codicon.codicon-"+this.id}}]),e}();!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"})}(u||(u={}));var d=/(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;function h(e){return e.replace(d,(function(e,t){return t?e:"\\".concat(e)}))}var f=/\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi;function p(e){return e.replace(f,(function(e){return"\\".concat(e)}))}var g=/(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi;function m(e){return e.replace(g,(function(e,t,n,r,i){return t?"$(".concat(n,")"):'')}))}var v=/(\s)?(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)(\s)?/gi;function _(e){return-1===e.indexOf(o.a)?e:e.replace(v,(function(e,t,n,r){return n?e:t||r||""}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(229);var i=n(266),o=n(184);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){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(e,t,n){"use strict";e.exports=n(438)},function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(r||(r={}));var i=a("instantiationService");function o(e,t,n,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[r.DI_TARGET]=t)}function a(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);var t=function e(t,n,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");o(e,t,r,!1)};return t.toString=function(){return e},r.serviceIds.set(e,t),t}function s(e){return function(t,n,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");o(e,t,r,!0)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return g})),n.d(t,"f",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"g",(function(){return b})),n.d(t,"d",(function(){return y}));var r,i=n(4),o=n(5),a=n(0),s=n(1),l=n(22),c=n(29),u=n(7),d=n(65),h=n(12),f=Object(c.c)("themeService");function p(e){return{id:e}}!function(e){e.isThemeIcon=function(e){return e&&"object"===typeof e&&"string"===typeof e.id};var t=/^\$\(([a-z.]+\/)?([a-z-~]+)\)$/i;e.fromString=function(e){var n=t.exec(e);if(n){var r=Object(l.a)(n,3),i=r[1];return i||(i="codicon/"),{id:i+r[2]}}};var n=/^(codicon\/)?([a-z-]+)(~[a-z]+)?$/i;e.asClassName=function(e){var t=n.exec(e.id);if(t){var r=Object(l.a)(t,4),i=r[2],o=r[3],a="codicon codicon-".concat(i);return o&&(a+=" ".concat(o.substr(1))),a}}}(r||(r={}));var g="hc";function m(e){switch(e){case"dark":return"vs-dark";case g:return"hc-black";default:return"vs"}}var v={ThemingContribution:"base.contributions.theming"},_=new(function(){function e(){Object(a.a)(this,e),this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new h.a}return Object(s.a)(e,[{key:"onColorThemeChange",value:function(e){var t=this;return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Object(u.h)((function(){var n=t.themingParticipants.indexOf(e);t.themingParticipants.splice(n,1)}))}},{key:"getThemingParticipants",value:function(){return this.themingParticipants}}]),e}());function b(e){return _.onColorThemeChange(e)}d.a.add(v.ThemingContribution,_);var y=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this)).themeService=e,r.theme=e.getColorTheme(),r._register(r.themeService.onDidColorThemeChange((function(e){return r.onThemeChange(e)}))),r}return Object(s.a)(n,[{key:"onThemeChange",value:function(e){this.theme=e,this.updateStyles()}},{key:"updateStyles",value:function(){}}]),n}(u.a)},function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return B})),n.d(t,"DOMParser",(function(){return ae})),n.d(t,"DOMSerializer",(function(){return _e})),n.d(t,"Fragment",(function(){return s})),n.d(t,"Mark",(function(){return h})),n.d(t,"MarkType",(function(){return re})),n.d(t,"Node",(function(){return M})),n.d(t,"NodeRange",(function(){return A})),n.d(t,"NodeType",(function(){return J})),n.d(t,"ReplaceError",(function(){return f})),n.d(t,"ResolvedPos",(function(){return T})),n.d(t,"Schema",(function(){return ie})),n.d(t,"Slice",(function(){return p})),r.prototype={constructor:r,find:function(e){for(var t=0;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var i=r;function o(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var i=e.child(r),a=t.child(r);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)n++;return n}if(i.content.size||a.content.size){var l=o(i.content,a.content,n+1);if(null!=l)return l}n+=i.nodeSize}else n+=i.nodeSize}}function a(e,t,n,r){for(var i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};var s=e.child(--i),l=t.child(--o),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){for(var u=0,d=Math.min(s.text.length,l.text.length);ue&&!1!==n(s,r+a,i,o)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=l}},s.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},s.prototype.textBetween=function(e,t,n,r){var i="",o=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(i+=a.text.slice(Math.max(e,s)-s,t-s),o=!n):a.isLeaf&&r?(i+=r,o=!n):!o&&a.isBlock&&(i+=n,o=!0)}),0),i},s.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);ie)for(var i=0,o=0;oe&&((ot)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=l}return new s(n,r)},s.prototype.cutByIndex=function(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))},s.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,i)},s.prototype.addToStart=function(e){return new s([e].concat(this.content),this.size+e.nodeSize)},s.prototype.addToEnd=function(e){return new s(this.content.concat(e),this.size+e.nodeSize)},s.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?u(n+1,i):u(n,r);r=i}},s.prototype.toString=function(){return"<"+this.toStringInner()+">"},s.prototype.toStringInner=function(){return this.content.join(", ")},s.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},s.fromJSON=function(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))},s.fromArray=function(e){if(!e.length)return s.empty;for(var t,n=0,r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t},h.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return b(e,t,n,0)}function b(e,t,n,r){var i=e.index(r),o=e.node(r);if(i==t.index(r)&&r=0;i--)r=t.node(i).copy(s.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return E(o,w(e,l.start,l.end,t,r))}var c=e.parent,u=c.content;return E(c,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}return E(o,O(e,t,r))}function y(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function S(e,t,n){var r=e.node(n);return y(r,t.node(n)),r}function C(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function k(e,t,n,r){var i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(C(e.nodeAfter,r),o++));for(var s=o;si&&S(e,t,i+1),a=r.depth>i&&S(n,r,i+1),l=[];return k(null,e,i,l),o&&a&&t.index(i)==n.index(i)?(y(o,a),C(E(o,w(e,t,n,r,i+1)),l)):(o&&C(E(o,O(e,t,i+1)),l),k(t,n,i,l),a&&C(E(a,O(n,r,i+1)),l)),k(r,null,i,l),new s(l)}function O(e,t,n){var r=[];(k(null,e,n,r),e.depth>n)&&C(E(S(e,t,n+1),O(e,t,n+1)),r);return k(t,null,n,r),new s(r)}g.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=v(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(m(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(s.fromJSON(e,t.content),n,r)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(var o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,g),p.empty=new p(s.empty,0,0);var T=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},x={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};T.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},x.parent.get=function(){return this.node(this.depth)},x.doc.get=function(){return this.node(0)},T.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},T.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},T.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},T.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},T.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},T.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},T.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},x.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},x.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},x.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},T.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,i=0;i0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},T.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new A(this,e,n)},T.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},T.prototype.max=function(e){return e.pos>this.pos?e:this},T.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,i=t,o=e;;){var a=o.content.findIndex(i),s=a.index,l=a.offset,c=i-l;if(n.push(o,s,r+l),!c)break;if((o=o.child(s)).isText)break;i=c-1,r+=l+1}return new T(t,n,i)},T.resolveCached=function(e,t){for(var n=0;ne&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},P.isBlock.get=function(){return this.type.isBlock},P.isTextblock.get=function(){return this.type.isTextblock},P.inlineContent.get=function(){return this.type.inlineContent},P.isInline.get=function(){return this.type.isInline},P.isText.get=function(){return this.type.isText},P.isLeaf.get=function(){return this.type.isLeaf},P.isAtom.get=function(){return this.type.isAtom},M.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),F(this.marks,e)},M.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},M.prototype.canReplace=function(e,t,n,r,i){void 0===n&&(n=s.empty),void 0===r&&(r=0),void 0===i&&(i=n.childCount);var o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var l=r;l=0;n--)t=e[n].type.name+"("+t+")";return t}var B=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},U={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};B.parse=function(e,t){var n=new H(e,t);if(null==n.next)return B.empty;var r=V(n);n.next&&n.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n($(e,0));function n(r){var i=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var o=i.indexOf(n),a=o>-1&&i[o+1];$(e,r).forEach((function(e){a||i.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var o=t[r.join(",")]=new B(r.indexOf(e.length-1)>-1),a=0;a>1},B.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},B.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r"+e.indexOf(t.next[i+1]);return r})).join("\n")},Object.defineProperties(B.prototype,U),B.empty=new B(!0);var H=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},z={next:{configurable:!0}};function V(e){var t=[];do{t.push(W(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function W(e){var t=[];do{t.push(G(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function G(e){for(var t=function(e){if(e.eat("(")){var t=V(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var i=[];for(var o in n){var a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}0==i.length&&e.err("No node type or group '"+t+"' found");return i}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=K(e,t)}return t}function q(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function K(e,t){var n=q(e),r=n;return e.eat(",")&&(r="}"!=e.next?q(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Y(e,t){return t-e}function $(e,t){var n=[];return function t(r){var i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(var o=0;o-1},J.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var ie=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=i.from(e.nodes),this.spec.marks=i.from(e.marks),this.nodes=J.compile(this.spec.nodes,this),this.marks=re.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=n[a]||(n[a]=B.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==s?null:s?oe(this,s.split(" ")):""!=s&&o.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:oe(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function oe(e,t){for(var n=[],r=0;r-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}ie.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof J))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},ie.prototype.text=function(e,t){var n=this.nodes.text;return new j(n,n.defaultAttrs,e,h.setFrom(t))},ie.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},ie.prototype.nodeFromJSON=function(e){return M.fromJSON(this,e)},ie.prototype.markFromJSON=function(e){return h.fromJSON(this,e)},ie.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ae=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};ae.prototype.parse=function(e,t){void 0===t&&(t={});var n=new he(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ae.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new he(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},ae.prototype.matchTag=function(e,t){for(var n=0;ne.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var o=i.getAttrs(t);if(!1===o)continue;i.attrs=o}return i}}},ae.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r=0;t--)if(this.stashMarks[t].type==e)return this.stashMarks.splice(t,1)[0]},de.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t=0;r--){var i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},he.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},he.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},fe.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},he.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1);return function e(a,s){for(;a>=0;a--){var l=n[a];if(""==l){if(a==n.length-1||0==a)continue;for(;s>=o;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&i?t.nodes[s].type:r&&s>=o?r.node(s-o).type:null;if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1;s--}return!0}(n.length-1,this.open)},he.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}},he.prototype.addPendingMark=function(e){var t=ve(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},he.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var i=r.popFromStashMark(e.type);i&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(he.prototype,fe);var _e=function(e,t){this.nodes=e||{},this.marks=t||{}};function be(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ye(e){return e.document||window.document}_e.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=ye(t).createDocumentFragment());var i=n,o=null;return e.forEach((function(e){if(o||e.marks.length){o||(o=[]);for(var n=0,a=0;n=0;r--){var i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n},_e.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&_e.renderSpec(ye(n),r(e,t))},_e.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));var o=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var c in l=2,s)if(null!=s[c]){var u=c.indexOf(" ");u>0?a.setAttributeNS(c.slice(0,u),c.slice(u+1),s[c]):a.setAttribute(c,s[c])}for(var d=l;dl)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=_e.renderSpec(e,h,n),p=f.dom,g=f.contentDOM;if(a.appendChild(p),g){if(o)throw new RangeError("Multiple content holes");o=g}}return{dom:a,contentDOM:o}},_e.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new _e(this.nodesFromSchema(e),this.marksFromSchema(e)))},_e.nodesFromSchema=function(e){var t=be(e.nodes);return t.text||(t.text=function(e){return e.text}),t},_e.marksFromSchema=function(e){return be(e.marks)}},function(e,t,n){"use strict";n.d(t,"i",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"j",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"l",(function(){return h})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"k",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(0),i=n(1),o=n(41),a=n(25),s=n(7);function l(e){return e&&"function"===typeof e.then}function c(e){var t=new o.b,n=e(t.token),s=new Promise((function(e,r){t.token.onCancellationRequested((function(){r(a.a())})),Promise.resolve(n).then((function(n){t.dispose(),e(n)}),(function(e){t.dispose(),r(e)}))}));return new(function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,[{key:"cancel",value:function(){t.cancel()}},{key:"then",value:function(e,t){return s.then(e,t)}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(e){return s.finally(e)}}]),e}())}function u(e,t,n){return Promise.race([e,new Promise((function(e){return t.onCancellationRequested((function(){return e(n)}))}))])}var d=function(){function e(t){Object(r.a)(this,e),this.defaultDelay=t,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}return Object(i.a)(e,[{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultDelay;return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e,n){t.doResolve=e,t.doReject=n})).then((function(){if(t.completionPromise=null,t.doResolve=null,t.task){var e=t.task;return t.task=null,e()}}))),this.timeout=setTimeout((function(){t.timeout=null,t.doResolve&&t.doResolve(null)}),n),this.completionPromise}},{key:"isTriggered",value:function(){return null!==this.timeout}},{key:"cancel",value:function(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(a.a()),this.completionPromise=null)}},{key:"cancelTimeout",value:function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}},{key:"dispose",value:function(){this.cancelTimeout()}}]),e}();function h(e,t){return t?new Promise((function(n,r){var i=setTimeout(n,e);t.onCancellationRequested((function(){clearTimeout(i),r(a.a())}))})):c((function(t){return h(e,t)}))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=setTimeout(e,t);return Object(s.h)((function(){return clearTimeout(n)}))}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return!!e},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=0,i=e.length,o=function o(){if(r>=i)return Promise.resolve(n);var a=e[r++];return Promise.resolve(a()).then((function(e){return t(e)?Promise.resolve(e):o()}))};return o()}var g,m=function(){function e(t,n){Object(r.a)(this,e),this._token=-1,"function"===typeof t&&"number"===typeof n&&this.setIfNotSet(t,n)}return Object(i.a)(e,[{key:"dispose",value:function(){this.cancel()}},{key:"cancel",value:function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}},{key:"cancelAndSet",value:function(e,t){var n=this;this.cancel(),this._token=setTimeout((function(){n._token=-1,e()}),t)}},{key:"setIfNotSet",value:function(e,t){var n=this;-1===this._token&&(this._token=setTimeout((function(){n._token=-1,e()}),t))}}]),e}(),v=function(){function e(){Object(r.a)(this,e),this._token=-1}return Object(i.a)(e,[{key:"dispose",value:function(){this.cancel()}},{key:"cancel",value:function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}},{key:"cancelAndSet",value:function(e,t){this.cancel(),this._token=setInterval((function(){e()}),t)}}]),e}(),_=function(){function e(t,n){Object(r.a)(this,e),this.timeoutToken=-1,this.runner=t,this.timeout=n,this.timeoutHandler=this.onTimeout.bind(this)}return Object(i.a)(e,[{key:"dispose",value:function(){this.cancel(),this.runner=null}},{key:"cancel",value:function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}},{key:"schedule",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}},{key:"isScheduled",value:function(){return-1!==this.timeoutToken}},{key:"onTimeout",value:function(){this.timeoutToken=-1,this.runner&&this.doRun()}},{key:"doRun",value:function(){this.runner&&this.runner()}}]),e}();!function(){if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var e=Object.freeze({didTimeout:!0,timeRemaining:function(){return 15}});g=function(t){var n=setTimeout((function(){return t(e)})),r=!1;return{dispose:function(){r||(r=!0,clearTimeout(n))}}}}else g=function(e,t){var n=requestIdleCallback(e,"number"===typeof t?{timeout:t}:void 0),r=!1;return{dispose:function(){r||(r=!0,cancelIdleCallback(n))}}}}();var b=function(){function e(t){var n=this;Object(r.a)(this,e),this._didRun=!1,this._executor=function(){try{n._value=t()}catch(e){n._error=e}finally{n._didRun=!0}},this._handle=g((function(){return n._executor()}))}return Object(i.a)(e,[{key:"dispose",value:function(){this._handle.dispose()}},{key:"value",get:function(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}]),e}()},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"j",(function(){return o})),n.d(t,"i",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"g",(function(){return f})),n.d(t,"m",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"n",(function(){return _}));var r=n(6);function i(e){return Array.isArray(e)}function o(e){return"string"===typeof e}function a(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(e){return"number"===typeof e&&!isNaN(e)}function l(e){return!0===e||!1===e}function c(e){return"undefined"===typeof e}function u(e){return c(e)||null===e}function d(e,t){if(!e)throw new Error(t?"Unexpected type, expected '".concat(t,"'"):"Unexpected type")}function h(e){if(u(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function f(e){return"function"===typeof e}function p(e,t){for(var n=Math.min(e.length,t.length),r=0;r "+this.positionLineNumber+","+this.positionColumn+"]"}},{key:"equalsSelection",value:function(e){return n.selectionsEqual(this,e)}},{key:"getDirection",value:function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}},{key:"setEndPosition",value:function(e,t){return 0===this.getDirection()?new n(this.startLineNumber,this.startColumn,e,t):new n(e,t,this.startLineNumber,this.startColumn)}},{key:"getPosition",value:function(){return new s.a(this.positionLineNumber,this.positionColumn)}},{key:"setStartPosition",value:function(e,t){return 0===this.getDirection()?new n(e,t,this.endLineNumber,this.endColumn):new n(this.endLineNumber,this.endColumn,e,t)}}],[{key:"selectionsEqual",value:function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}},{key:"fromPositions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new n(e.lineNumber,e.column,t.lineNumber,t.column)}},{key:"liftSelection",value:function(e){return new n(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}},{key:"selectionsArrEqual",value:function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n=65536?2:1,9===c)a=e.nextRenderTabStop(a,r);else{for(var u=s.y(c);l=65536?2:1,u=h}s.E(c)||s.C(c)?a+=2:a+=1}}return a}},{key:"visibleColumnFromColumn2",value:function(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)}},{key:"columnFromVisibleColumn",value:function(t,n,r){if(n<=0)return 1;for(var i=t.length,o=0,a=1,l=0;l=65536?2:1;var u=void 0;if(9===c)u=e.nextRenderTabStop(o,r);else{for(var d=s.y(c);l=65536?2:1,d=f}u=s.E(c)||s.C(c)?o+2:o+1}var p=l+1;if(u>=n)return u-na?a:i}},{key:"nextRenderTabStop",value:function(e,t){return e+t-e%t}},{key:"nextIndentTabStop",value:function(e,t){return e+t-e%t}},{key:"prevRenderTabStop",value:function(e,t){return e-1-(e-1)%t}},{key:"prevIndentTabStop",value:function(e,t){return e-1-(e-1)%t}}]),e}();function w(e){return"'"===e||'"'===e||"`"===e}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return f})),n.d(t,"EditorState",(function(){return C})),n.d(t,"NodeSelection",(function(){return d})),n.d(t,"Plugin",(function(){return O})),n.d(t,"PluginKey",(function(){return N})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return l})),n.d(t,"TextSelection",(function(){return c})),n.d(t,"Transaction",(function(){return v}));var r=n(31),i=n(68),o=Object.create(null),a=function(e,t,n){this.ranges=n||[new l(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var e=this.ranges,t=0;t=0;i--){var o=t<0?g(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):g(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(o)return o}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))},a.atStart=function(e){return g(e,e,0,0,1)||new f(e)},a.atEnd=function(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=o[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return c.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var l=function(e,t){this.$from=e,this.$to=t},c=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var i=n.resolve(r.map(this.head));if(!i.parent.inlineContent)return e.near(i);var o=n.resolve(r.map(this.anchor));return new t(o.parent.inlineContent?o:i,i)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new u(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,i){var o=n.pos-r.pos;if(i&&!o||(i=o>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,i,!0)||e.findFrom(r,-i,!0);if(!a)return e.near(r,i);r=a.$head}return n.parent.inlineContent||(0==o||(n=(e.findFrom(n,-i,!0)||e.findFrom(n,i,!0)).$anchor).pos0?0:1);i>0?a=0;a+=i){var s=t.child(a);if(s.isAtom){if(!o&&d.isSelectable(s))return d.create(e,n-(i<0?s.nodeSize:0))}else{var l=g(e,s,n+i,i<0?s.childCount:0,i,o);if(l)return l}n+=s.nodeSize*i}}function m(e,t,n){var r=e.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var i=this.storedMarks;if(!i){var o=this.doc.resolve(t);i=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(i.d);function _(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=_(t.init,n),this.apply=_(t.apply,n)},y=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],S=function(e,t){var n=this;this.schema=e,this.fields=y.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},C=function(e){this.config=e},k={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};k.schema.get=function(){return this.config.schema},k.plugins.get=function(){return this.config.plugins},C.prototype.apply=function(e){return this.applyTransaction(e).state},C.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&E.splice(t,1)},Object.defineProperties(C.prototype,k);var E=[];function w(e,t,n){for(var r in e){var i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=w(i,t,{})),n[r]=i}return n}var O=function(e){this.props={},e.props&&w(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:x("plugin")};O.prototype.getState=function(e){return e[this.key]};var T=Object.create(null);function x(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}var N=function(e){void 0===e&&(e="key"),this.key=x(e)};N.prototype.get=function(e){return e.config.pluginsByKey[this.key]},N.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return O}));var r,i=n(38),o=n(4),a=n(5),s=n(0),l=n(1),c=n(21),u=n(64),d=/^\w[\w\d+.-]*$/,h=/^\//,f=/^\/\//;function p(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!d.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!h.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(f.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 g(e,t){return e||t?e:"file"}function m(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==_&&(t=_+t):t=_}return t}var v="",_="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,y=function(){function e(t,n,r,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Object(s.a)(this,e),"object"===typeof t?(this.scheme=t.scheme||v,this.authority=t.authority||v,this.path=t.path||v,this.query=t.query||v,this.fragment=t.fragment||v):(this.scheme=g(t,a),this.authority=n||v,this.path=m(this.scheme,r||v),this.query=i||v,this.fragment=o||v,p(this,a))}return Object(l.a)(e,[{key:"with",value:function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=v),void 0===n?n=this.authority:null===n&&(n=v),void 0===r?r=this.path:null===r&&(r=v),void 0===i?i=this.query:null===i&&(i=v),void 0===o?o=this.fragment:null===o&&(o=v),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new C(t,n,r,i,o)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return T(this,e)}},{key:"toJSON",value:function(){return this}},{key:"fsPath",get:function(){return O(this,!1)}}],[{key:"isUri",value:function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme&&"function"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)}},{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=b.exec(e);return n?new C(n[2]||v,D(n[4]||v),D(n[5]||v),D(n[7]||v),D(n[9]||v),t):new C(v,v,v,v,v)}},{key:"file",value:function(e){var t=v;if(c.i&&(e=e.replace(/\\/g,_)),e[0]===_&&e[1]===_){var n=e.indexOf(_,2);-1===n?(t=e.substring(2),e=_):(t=e.substring(2,n),e=e.substring(n)||_)}return new C("file",t,e,v,v)}},{key:"from",value:function(e){return new C(e.scheme,e.authority,e.path,e.query,e.fragment)}},{key:"joinPath",value:function(t){if(!t.path)throw new Error("[UriError]: cannot call joinPaths on URI without path");for(var n,r,i,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];return e?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}},{key:"toJSON",value:function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=S),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}},{key:"fsPath",get:function(){return this._fsPath||(this._fsPath=O(this,!1)),this._fsPath}}]),n}(y),k=(r={},Object(i.a)(r,58,"%3A"),Object(i.a)(r,47,"%2F"),Object(i.a)(r,63,"%3F"),Object(i.a)(r,35,"%23"),Object(i.a)(r,91,"%5B"),Object(i.a)(r,93,"%5D"),Object(i.a)(r,64,"%40"),Object(i.a)(r,33,"%21"),Object(i.a)(r,36,"%24"),Object(i.a)(r,38,"%26"),Object(i.a)(r,39,"%27"),Object(i.a)(r,40,"%28"),Object(i.a)(r,41,"%29"),Object(i.a)(r,42,"%2A"),Object(i.a)(r,43,"%2B"),Object(i.a)(r,44,"%2C"),Object(i.a)(r,59,"%3B"),Object(i.a)(r,61,"%3D"),Object(i.a)(r,32,"%20"),r);function E(e,t){for(var n=void 0,r=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var a=k[o];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=a):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function w(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//".concat(e.authority).concat(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,c.i&&(n=n.replace(/\//g,"\\")),n}function T(e,t){var n=t?w:E,r="",i=e.scheme,o=e.authority,a=e.path,s=e.query,l=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=_,r+=_),o){var c=o.indexOf("@");if(-1!==c){var u=o.substr(0,c);o=o.substr(c+1),-1===(c=u.indexOf(":"))?r+=n(u,!1):(r+=n(u.substr(0,c),!1),r+=":",r+=n(u.substr(c+1),!1)),r+="@"}-1===(c=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){var d=a.charCodeAt(1);d>=65&&d<=90&&(a="/".concat(String.fromCharCode(d+32),":").concat(a.substr(3)))}else if(a.length>=2&&58===a.charCodeAt(1)){var h=a.charCodeAt(0);h>=65&&h<=90&&(a="".concat(String.fromCharCode(h+32),":").concat(a.substr(2)))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),l&&(r+="#",r+=t?l:E(l,!1)),r}function x(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+x(e.substr(3)):e}}var N=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(e){return e.match(N)?e.replace(N,(function(e){return x(e)})):e}},function(e,t,n){"use strict";n.d(t,"f",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return O})),n.d(t,"e",(function(){return x})),n.d(t,"c",(function(){return N}));var r=n(276),i=n(17),o=n(16),a=n(22),s=n(4),l=n(5),c=n(27),u=n(6),d=n(1),h=n(0),f=n(69),p=n(29),g=n(18),m=n(44),v=n(7),_=n(12),b=n(55),y=n(99),S=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},C=function(e,t){return function(n,r){t(n,r,e)}};function k(e){return void 0!==e.command}var E=function e(t){Object(h.a)(this,e),this.id=e._idPool++,this._debugName=t};E._idPool=0,E.CommandPalette=new E("CommandPalette"),E.EditorContext=new E("EditorContext"),E.EditorContextPeek=new E("EditorContextPeek"),E.MenubarEditMenu=new E("MenubarEditMenu"),E.MenubarGoMenu=new E("MenubarGoMenu"),E.MenubarSelectionMenu=new E("MenubarSelectionMenu");var w=Object(p.c)("menuService"),O=new(function(){function e(){Object(h.a)(this,e),this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new _.a,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:function(e){return e===E.CommandPalette}}}return Object(d.a)(e,[{key:"addCommand",value:function(e){return this.addCommands(b.a.single(e))}},{key:"addCommands",value:function(e){var t,n=this,r=Object(u.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;this._commands.set(i.id,i)}}catch(o){r.e(o)}finally{r.f()}return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(v.h)((function(){var t,r=!1,i=Object(u.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;r=n._commands.delete(a.id)||r}}catch(o){i.e(o)}finally{i.f()}r&&n._onDidChangeMenu.fire(n._commandPaletteChangeEvent)}))}},{key:"getCommand",value:function(e){return this._commands.get(e)}},{key:"getCommands",value:function(){var e=new Map;return this._commands.forEach((function(t,n){return e.set(n,t)})),e}},{key:"appendMenuItem",value:function(e,t){return this.appendMenuItems(b.a.single({id:e,item:t}))}},{key:"appendMenuItems",value:function(e){var t,n=this,r=new Set,i=new y.a,o=Object(u.a)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.id,l=a.item,c=this._menuItems.get(s);c||(c=new y.a,this._menuItems.set(s,c)),i.push(c.push(l)),r.add(s)}}catch(d){o.e(d)}finally{o.f()}return this._onDidChangeMenu.fire(r),Object(v.h)((function(){if(i.size>0){var e,t=Object(u.a)(i);try{for(t.s();!(e=t.n()).done;){(0,e.value)()}}catch(d){t.e(d)}finally{t.f()}n._onDidChangeMenu.fire(r),i.clear()}}))}},{key:"getMenuItems",value:function(e){var t;return t=this._menuItems.has(e)?Object(c.a)(this._menuItems.get(e)):[],e===E.CommandPalette&&this._appendImplicitItems(t),t}},{key:"_appendImplicitItems",value:function(e){var t,n=new Set,r=Object(u.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;k(i)&&(n.add(i.command.id),i.alt&&n.add(i.alt.id))}}catch(o){r.e(o)}finally{r.f()}this._commands.forEach((function(t,r){n.has(r)||e.push({command:t})}))}}]),e}()),T=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,i){var o;return Object(h.a)(this,n),(o=t.call(this,e,r))._commandService=i,o}return Object(d.a)(n,[{key:"run",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r0&&(t.push.apply(t,Object(c.a)(p)),t.push(new f.c))}}catch(g){d.e(g)}finally{d.f()}return t.length&&t.pop(),t}),"submenu")).item=e,s}return n}(f.d),N=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,i,o,a,s){var l;if(Object(h.a)(this,n),(l="string"===typeof e.title?t.call(this,e.id,e.title,s):t.call(this,e.id,e.title.value,s))._cssClass=void 0,l._enabled=!e.precondition||a.contextMatchesRules(e.precondition),l._tooltip=e.tooltip?"string"===typeof e.tooltip?e.tooltip:e.tooltip.value:void 0,e.toggled){var c=e.toggled.condition?e.toggled:{condition:e.toggled};l._checked=a.contextMatchesRules(c.condition),l._checked&&c.tooltip&&(l._tooltip="string"===typeof c.tooltip?c.tooltip:c.tooltip.value)}return l._options=o||{},l.item=e,l.alt=i?new n(i,void 0,l._options,a,s):void 0,Object(r.a)(l)}return Object(d.a)(n,[{key:"dispose",value:function(){this.alt&&this.alt.dispose(),Object(i.a)(Object(o.a)(n.prototype),"dispose",this).call(this)}},{key:"run",value:function(){var e,t=[];if(this._options.arg&&(t=[].concat(Object(c.a)(t),[this._options.arg])),this._options.shouldForwardArgs){for(var r=arguments.length,a=new Array(r),s=0;s0&&void 0!==arguments[0]&&arguments[0];e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof l&&this._token.dispose():this._token=r.None}},{key:"token",get:function(){return this._token||(this._token=new l),this._token}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(28));t.default=function(e){var t=e.children,n=e.className,i=e.onClick,o=(e.theme,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","className","onClick","theme"])),a=o.size?o.size+"px":"24px",s="#4E5C6E";return o.color&&(s=o.color),o.light&&(s="#FFF"),o.black&&(s="#000"),r.createElement("svg",{fill:s,width:a,height:a,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:n,onClick:i},t)}},function(e,t,n){"use strict";n.d(t,"h",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return p})),n.d(t,"i",(function(){return E})),n.d(t,"e",(function(){return D})),n.d(t,"f",(function(){return P})),n.d(t,"l",(function(){return G})),n.d(t,"c",(function(){return X})),n.d(t,"d",(function(){return J})),n.d(t,"k",(function(){return ee})),n.d(t,"g",(function(){return ne}));var r=n(6),i=n(4),o=n(5),a=n(0),s=n(1),l=n(2),c=n(21),u=n(154),d=8,h=function(){function e(t){Object(a.a)(this,e),this._values=t}return Object(s.a)(e,[{key:"hasChanged",value:function(e){return this._values[e]}}]),e}(),f=function(){function e(){Object(a.a)(this,e),this._values=[]}return Object(s.a)(e,[{key:"_read",value:function(e){return this._values[e]}},{key:"get",value:function(e){return this._values[e]}},{key:"_write",value:function(e,t){this._values[e]=t}}]),e}(),p=function e(){Object(a.a)(this,e),this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0},g=function(){function e(t,n,r,i){Object(a.a)(this,e),this.id=t,this.name=n,this.defaultValue=r,this.schema=i}return Object(s.a)(e,[{key:"compute",value:function(e,t,n){return n}}]),e}(),m=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object(a.a)(this,e),this.schema=void 0,this.id=t,this.name="_never_",this.defaultValue=void 0,this.deps=n}return Object(s.a)(e,[{key:"validate",value:function(e){return this.defaultValue}}]),e}(),v=function(){function e(t,n,r,i){Object(a.a)(this,e),this.id=t,this.name=n,this.defaultValue=r,this.schema=i}return Object(s.a)(e,[{key:"validate",value:function(e){return"undefined"===typeof e?this.defaultValue:e}},{key:"compute",value:function(e,t,n){return n}}]),e}(),_=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return Object(a.a)(this,n),"undefined"!==typeof o&&(o.type="boolean",o.default=i),t.call(this,e,r,i,o)}return Object(s.a)(n,null,[{key:"boolean",value:function(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}}]),Object(s.a)(n,[{key:"validate",value:function(e){return n.boolean(e,this.defaultValue)}}]),n}(v),b=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i,o,s){var l,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0;return Object(a.a)(this,n),"undefined"!==typeof c&&(c.type="integer",c.default=i,c.minimum=o,c.maximum=s),(l=t.call(this,e,r,i,c)).minimum=o,l.maximum=s,l}return Object(s.a)(n,[{key:"validate",value:function(e){return n.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}],[{key:"clampedInt",value:function(e,t,n,r){if("undefined"===typeof e)return t;var i=parseInt(e,10);return isNaN(i)?t:(i=Math.max(n,i),0|(i=Math.min(r,i)))}}]),n}(v),y=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i,o,s){var l;return Object(a.a)(this,n),"undefined"!==typeof s&&(s.type="number",s.default=i),(l=t.call(this,e,r,i,s)).validationFn=o,l}return Object(s.a)(n,[{key:"validate",value:function(e){return this.validationFn(n.float(e,this.defaultValue))}}],[{key:"clamp",value:function(e,t,n){return en?n:e}},{key:"float",value:function(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;var n=parseFloat(e);return isNaN(n)?t:n}}]),n}(v),S=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return Object(a.a)(this,n),"undefined"!==typeof o&&(o.type="string",o.default=i),t.call(this,e,r,i,o)}return Object(s.a)(n,null,[{key:"string",value:function(e,t){return"string"!==typeof e?t:e}}]),Object(s.a)(n,[{key:"validate",value:function(e){return n.string(e,this.defaultValue)}}]),n}(v),C=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i,o){var s,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return Object(a.a)(this,n),"undefined"!==typeof l&&(l.type="string",l.enum=o,l.default=i),(s=t.call(this,e,r,i,l))._allowedValues=o,s}return Object(s.a)(n,[{key:"validate",value:function(e){return n.stringSet(e,this.defaultValue,this._allowedValues)}}],[{key:"stringSet",value:function(e,t,n){return"string"!==typeof e||-1===n.indexOf(e)?t:e}}]),n}(v),k=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,r,i,o,s,l){var c,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;return Object(a.a)(this,n),"undefined"!==typeof u&&(u.type="string",u.enum=s,u.default=o),(c=t.call(this,e,r,i,u))._allowedValues=s,c._convert=l,c}return Object(s.a)(n,[{key:"validate",value:function(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}]),n}(g);var E,w=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),l.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),l.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:l.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")})}return Object(s.a)(n,[{key:"validate",value:function(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}},{key:"compute",value:function(e,t,n){return 0===n?e.accessibilitySupport:n}}]),n}(g),O=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={insertSpace:!0,ignoreEmptyLines:!0};return t.call(this,14,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.a("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.a("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{insertSpace:_.boolean(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_.boolean(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}]),n}(g);!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"}(E||(E={}));var T=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,114,[57,27])}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){var r=["monaco-editor"];return t.get(27)&&r.push(t.get(27)),e.extraEditorClassName&&r.push(e.extraEditorClassName),"default"===t.get(57)?r.push("mouse-default"):"copy"===t.get(57)&&r.push("mouse-copy"),t.get(92)&&r.push("showUnused"),t.get(113)&&r.push("showDeprecated"),r.join(" ")}}]),n}(m),x=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,26,"emptySelectionClipboard",!0,{description:l.a("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){return n&&e.emptySelectionClipboard}}]),n}(_),N=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};return t.call(this,29,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.a("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:l.a("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:[l.a("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)"),l.a("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically"),l.a("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:l.a("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.a("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:c.f},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.a("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:l.a("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{cursorMoveOnType:_.boolean(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:_.boolean(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":C.stringSet(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_.boolean(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_.boolean(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_.boolean(t.loop,this.defaultValue.loop)}}}]),n}(g),D=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,37,"fontLigatures",n.OFF,{anyOf:[{type:"boolean",description:l.a("fontLigatures","Enables/Disables font ligatures.")},{type:"string",description:l.a("fontFeatureSettings","Explicit font-feature-settings.")}],description:l.a("fontLigaturesGeneral","Configures font ligatures or font features."),default:!1})}return Object(s.a)(n,[{key:"validate",value:function(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?n.OFF:"true"===e?n.ON:e:Boolean(e)?n.ON:n.OFF}}]),n}(g);D.OFF='"liga" off, "calt" off',D.ON='"liga" on, "calt" on';var L=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,36)}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){return e.fontInfo}}]),n}(m),A=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,38,"fontSize",X.fontSize,{type:"number",minimum:6,maximum:100,default:X.fontSize,description:l.a("fontSize","Controls the font size in pixels.")})}return Object(s.a)(n,[{key:"validate",value:function(e){var t=y.float(e,this.defaultValue);return 0===t?X.fontSize:y.clamp(t,6,100)}},{key:"compute",value:function(e,t,n){return e.fontInfo.fontSize}}]),n}(v),I=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,39,"fontWeight",X.fontWeight,{anyOf:[{type:"number",minimum:n.MINIMUM_VALUE,maximum:n.MAXIMUM_VALUE,errorMessage:l.a("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:n.SUGGESTION_VALUES}],default:X.fontWeight,description:l.a("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}return Object(s.a)(n,[{key:"validate",value:function(e){return"normal"===e||"bold"===e?e:String(b.clampedInt(e,X.fontWeight,n.MINIMUM_VALUE,n.MAXIMUM_VALUE))}}]),n}(g);I.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],I.MINIMUM_VALUE=1,I.MAXIMUM_VALUE=1e3;var R=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var 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:""},r={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.a("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),l.a("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),l.a("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]};return t.call(this,43,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.a("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:l.a("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},r),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:l.a("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},r),"editor.gotoLocation.multipleDeclarations":Object.assign({description:l.a("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},r),"editor.gotoLocation.multipleImplementations":Object.assign({description:l.a("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},r),"editor.gotoLocation.multipleReferences":Object.assign({description:l.a("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},r),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,description:l.a("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:l.a("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:l.a("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:l.a("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:l.a("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){var t,n,r,i,o;if(!e||"object"!==typeof e)return this.defaultValue;var a=e;return{multiple:C.stringSet(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=a.multipleDefinitions)&&void 0!==t?t:C.stringSet(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(n=a.multipleTypeDefinitions)&&void 0!==n?n:C.stringSet(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(r=a.multipleDeclarations)&&void 0!==r?r:C.stringSet(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(i=a.multipleImplementations)&&void 0!==i?i:C.stringSet(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=a.multipleReferences)&&void 0!==o?o:C.stringSet(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}]),n}(g),M=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={enabled:!0,delay:300,sticky:!0};return t.call(this,46,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.a("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:l.a("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.a("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{enabled:_.boolean(t.enabled,this.defaultValue.enabled),delay:b.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_.boolean(t.sticky,this.defaultValue.sticky)}}}]),n}(g),P=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,117,[42,50,31,56,84,52,53,86,106,109,110,2])}return Object(s.a)(n,[{key:"compute",value:function(e,t,r){return n.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})}}],[{key:"computeContainedMinimapLineCount",value:function(e){var t=e.height/e.lineHeight,n=e.scrollBeyondLastLine?t-1:0,r=(e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:n,desiredRatio:r,minimapLineCount:Math.floor(e.viewLineCount/r)}}},{key:"_computeMinimapLayout",value:function(e,t){var r=e.outerWidth,i=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*i),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:i};var a=t.stableMinimapLayoutInput,s=a&&e.outerHeight===a.outerHeight&&e.lineHeight===a.lineHeight&&e.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&e.pixelRatio===a.pixelRatio&&e.scrollBeyondLastLine===a.scrollBeyondLastLine&&e.minimap.enabled===a.minimap.enabled&&e.minimap.side===a.minimap.side&&e.minimap.size===a.minimap.size&&e.minimap.showSlider===a.minimap.showSlider&&e.minimap.renderCharacters===a.minimap.renderCharacters&&e.minimap.maxColumn===a.minimap.maxColumn&&e.minimap.scale===a.minimap.scale&&e.verticalScrollbarWidth===a.verticalScrollbarWidth&&e.isViewportWrapping===a.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,h=e.minimap.renderCharacters,f=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale,p=e.minimap.maxColumn,g=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,y=e.isViewportWrapping,S=h?2:3,C=Math.floor(o*i),k=C/o,E=!1,w=!1,O=S*f,T=f/o,x=1;if("fill"===g||"fit"===g){var N=n.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:u,height:i,lineHeight:l,pixelRatio:o}),D=N.typicalViewportLineCount,L=N.extraLinesBeyondLastLine,A=N.desiredRatio;if(_/N.minimapLineCount>1)E=!0,w=!0,O=1,T=(f=1)/o;else{var I=!1,R=f+1;if("fit"===g){var M=Math.ceil((_+L)*O);y&&s&&b<=t.stableFitRemainingWidth?(I=!0,R=t.stableFitMaxMinimapScale):(I=M>C,y&&I?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===g||I){E=!0;var P=f;O=Math.min(l*o,Math.max(1,Math.floor(1/A))),(f=Math.min(R,Math.max(1,Math.floor(O/S))))>P&&(x=Math.min(2,f/P)),T=f/o/x,C=Math.ceil(Math.max(D,_+L)*O),y&&I&&(t.stableFitMaxMinimapScale=f)}}}var j=Math.floor(p*T),F=Math.min(j,Math.max(0,Math.floor((b-v-2)*T/(c+T)))+d),B=Math.floor(o*F),U=B/o;return{renderMinimap:h?1:2,minimapLeft:"left"===m?0:r-F-v,minimapWidth:F,minimapHeightIsEditorHeight:E,minimapIsSampling:w,minimapScale:f,minimapLineHeight:O,minimapCanvasInnerWidth:B=Math.floor(B*x),minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:U,minimapCanvasOuterHeight:k}}},{key:"computeLayout",value:function(e,t){var r,i=0|t.outerWidth,o=0|t.outerHeight,a=0|t.lineHeight,s=0|t.lineNumbersDigitCount,l=t.typicalHalfwidthCharacterWidth,c=t.maxDigitWidth,u=t.pixelRatio,d=t.viewLineCount,h=e.get(106),f=e.get(109),g=e.get(110),m=e.get(2),v=t.isDominatedByLongLines,_=e.get(42),y=0!==e.get(52).renderType,S=e.get(53),C=e.get(86),k=e.get(56),E=e.get(84),w=E.verticalScrollbarSize,O=E.verticalHasArrows,T=E.arrowSize,x=E.horizontalScrollbarSize,N=e.get(50),D=e.get(31);if("string"===typeof N&&/^\d+(\.\d+)?ch$/.test(N)){var L=parseFloat(N.substr(0,N.length-2));r=b.clampedInt(L*l,0,0,1e3)}else r=b.clampedInt(N,0,0,1e3);D&&(r+=16);var A=0;if(y){var I=Math.max(s,S);A=Math.round(I*c)}var R=0;_&&(R=a);var M=0,P=M+R,j=P+A,F=j+r,B=i-R-A-r,U=!1,H=!1,z=-1;2!==m&&(g&&v?(U=!0,H=!0):"on"===h||"bounded"===h?H=!0:"wordWrapColumn"===h&&(z=f));var V=n._computeMinimapLayout({outerWidth:i,outerHeight:o,lineHeight:a,typicalHalfwidthCharacterWidth:l,pixelRatio:u,scrollBeyondLastLine:C,minimap:k,verticalScrollbarWidth:w,viewLineCount:d,remainingWidth:B,isViewportWrapping:H},t.memory||new p);0!==V.renderMinimap&&0===V.minimapLeft&&(M+=V.minimapWidth,P+=V.minimapWidth,j+=V.minimapWidth,F+=V.minimapWidth);var W=B-V.minimapWidth,G=Math.max(1,Math.floor((W-w-2)/l)),q=O?T:0;return H&&(z=Math.max(1,G),"bounded"===h&&(z=Math.min(z,f))),{width:i,height:o,glyphMarginLeft:M,glyphMarginWidth:R,lineNumbersLeft:P,lineNumbersWidth:A,decorationsLeft:j,decorationsWidth:r,contentLeft:F,contentWidth:W,minimap:V,viewportColumn:G,isWordWrapMinified:U,isViewportWrapping:H,wrappingColumn:z,verticalScrollbarWidth:w,horizontalScrollbarHeight:x,overviewRuler:{top:q,width:w,height:o-2*q,right:0}}}}]),n}(m),j=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={enabled:!0};return t.call(this,49,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:l.a("codeActions","Enables the code action lightbulb in the editor.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{enabled:_.boolean(t.enabled,this.defaultValue.enabled)}}}]),n}(g),F=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,51,"lineHeight",X.lineHeight,0,150,{description:l.a("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){return e.fontInfo.lineHeight}}]),n}(b),B=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};return t.call(this,56,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.a("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.a("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.a("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.a("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.a("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.a("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.a("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:l.a("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.a("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.a("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{enabled:_.boolean(t.enabled,this.defaultValue.enabled),size:C.stringSet(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:C.stringSet(t.side,this.defaultValue.side,["right","left"]),showSlider:C.stringSet(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_.boolean(t.renderCharacters,this.defaultValue.renderCharacters),scale:b.clampedInt(t.scale,1,1,3),maxColumn:b.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}]),n}(g);var U=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,66,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.a("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:l.a("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{top:b.clampedInt(t.top,0,0,1e3),bottom:b.clampedInt(t.bottom,0,0,1e3)}}}]),n}(g),H=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e={enabled:!0,cycle:!1};return t.call(this,67,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.a("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:l.a("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e;return{enabled:_.boolean(t.enabled,this.defaultValue.enabled),cycle:_.boolean(t.cycle,this.defaultValue.cycle)}}}]),n}(g),z=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,115)}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){return e.pixelRatio}}]),n}(m),V=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){var e;Object(a.a)(this,n);var r={other:!0,comments:!1,strings:!1};return(e=t.call(this,70,"quickSuggestions",r,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:r.strings,description:l.a("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:r.comments,description:l.a("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:r.other,description:l.a("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:r,description:l.a("quickSuggestions","Controls whether suggestions should automatically show up while typing.")})).defaultValue=r,e}return Object(s.a)(n,[{key:"validate",value:function(e){if("boolean"===typeof e)return e;if(e&&"object"===typeof e){var t=e,n={other:_.boolean(t.other,this.defaultValue.other),comments:_.boolean(t.comments,this.defaultValue.comments),strings:_.boolean(t.strings,this.defaultValue.strings)};return!!(n.other&&n.comments&&n.strings)||!!(n.other||n.comments||n.strings)&&n}return this.defaultValue}}]),n}(g),W=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,52,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.a("lineNumbers.off","Line numbers are not rendered."),l.a("lineNumbers.on","Line numbers are rendered as absolute number."),l.a("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.a("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.a("lineNumbers","Controls the display of line numbers.")})}return Object(s.a)(n,[{key:"validate",value:function(e){var t=this.defaultValue.renderType,n=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,n=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:n}}}]),n}(g);function G(e){var t=e.get(79);return"editable"===t?e.get(72):"on"!==t}var q=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var e=[],r={type:"number",description:l.a("rulers.size","Number of monospace characters at which this editor ruler will render.")};return t.call(this,83,"rulers",e,{type:"array",items:{anyOf:[r,{type:["object"],properties:{column:r,color:{type:"string",description:l.a("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.a("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.")})}return Object(s.a)(n,[{key:"validate",value:function(e){if(Array.isArray(e)){var t,n=[],i=Object(r.a)(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;if("number"===typeof o)n.push({column:b.clampedInt(o,0,0,1e4),color:null});else if(o&&"object"===typeof o){var a=o;n.push({column:b.clampedInt(a.column,0,0,1e4),color:a.color})}}}catch(s){i.e(s)}finally{i.f()}return n.sort((function(e,t){return e.column-t.column})),n}return this.defaultValue}}]),n}(g);function K(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}var Y=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,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})}return Object(s.a)(n,[{key:"validate",value:function(e){if(!e||"object"!==typeof e)return this.defaultValue;var t=e,n=b.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),r=b.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:b.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:K(t.vertical,this.defaultValue.vertical),horizontal:K(t.horizontal,this.defaultValue.horizontal),useShadows:_.boolean(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_.boolean(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_.boolean(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_.boolean(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_.boolean(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:n,horizontalSliderSize:b.clampedInt(t.horizontalSliderSize,n,0,1e3),verticalScrollbarSize:r,verticalSliderSize:b.clampedInt(t.verticalSliderSize,r,0,1e3)}}}]),n}(g),$=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){Object(a.a)(this,n);var 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}};return t.call(this,96,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.a("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.a("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.a("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:l.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.a("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.a("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:l.a("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.a("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.maxVisibleSuggestions":{type:"number",default:e.maxVisibleSuggestions,minimum:1,maximum:15,description:l.a("suggest.maxVisibleSuggestions","Controls how many suggestions IntelliSense will show before showing a scrollbar (maximum 15).")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.a("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:l.a("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.a("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,markdownDescription:l.a("editor.suggest.statusBar.visible","Controls the visibility of the status bar at the bottom of the suggest widget.")}})}return Object(s.a)(n,[{key:"validate",value:function(e){var t;if(!e||"object"!==typeof e)return this.defaultValue;var n=e;return{insertMode:C.stringSet(n.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_.boolean(n.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_.boolean(n.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_.boolean(n.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_.boolean(n.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:_.boolean(n.showIcons,this.defaultValue.showIcons),maxVisibleSuggestions:b.clampedInt(n.maxVisibleSuggestions,this.defaultValue.maxVisibleSuggestions,1,15),showMethods:_.boolean(n.showMethods,this.defaultValue.showMethods),showFunctions:_.boolean(n.showFunctions,this.defaultValue.showFunctions),showConstructors:_.boolean(n.showConstructors,this.defaultValue.showConstructors),showFields:_.boolean(n.showFields,this.defaultValue.showFields),showVariables:_.boolean(n.showVariables,this.defaultValue.showVariables),showClasses:_.boolean(n.showClasses,this.defaultValue.showClasses),showStructs:_.boolean(n.showStructs,this.defaultValue.showStructs),showInterfaces:_.boolean(n.showInterfaces,this.defaultValue.showInterfaces),showModules:_.boolean(n.showModules,this.defaultValue.showModules),showProperties:_.boolean(n.showProperties,this.defaultValue.showProperties),showEvents:_.boolean(n.showEvents,this.defaultValue.showEvents),showOperators:_.boolean(n.showOperators,this.defaultValue.showOperators),showUnits:_.boolean(n.showUnits,this.defaultValue.showUnits),showValues:_.boolean(n.showValues,this.defaultValue.showValues),showConstants:_.boolean(n.showConstants,this.defaultValue.showConstants),showEnums:_.boolean(n.showEnums,this.defaultValue.showEnums),showEnumMembers:_.boolean(n.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_.boolean(n.showKeywords,this.defaultValue.showKeywords),showWords:_.boolean(n.showWords,this.defaultValue.showWords),showColors:_.boolean(n.showColors,this.defaultValue.showColors),showFiles:_.boolean(n.showFiles,this.defaultValue.showFiles),showReferences:_.boolean(n.showReferences,this.defaultValue.showReferences),showFolders:_.boolean(n.showFolders,this.defaultValue.showFolders),showTypeParameters:_.boolean(n.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_.boolean(n.showSnippets,this.defaultValue.showSnippets),showUsers:_.boolean(n.showUsers,this.defaultValue.showUsers),showIssues:_.boolean(n.showIssues,this.defaultValue.showIssues),statusBar:{visible:_.boolean(null===(t=n.statusBar)||void 0===t?void 0:t.visible,!!this.defaultValue.statusBar.visible)}}}}]),n}(g),Q=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,116,[72])}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){return!!t.get(72)||e.tabFocusMode}}]),n}(m);var Z=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(){return Object(a.a)(this,n),t.call(this,118,[117])}return Object(s.a)(n,[{key:"compute",value:function(e,t,n){var r=t.get(117);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:r.isWordWrapMinified,isViewportWrapping:r.isViewportWrapping,wrappingColumn:r.wrappingColumn}}}]),n}(m),X={fontFamily:c.f?"Menlo, Monaco, 'Courier New', monospace":c.d?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:c.f?12:14,lineHeight:0,letterSpacing:0},J={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},ee=[];function te(e){return ee[e.id]=e,e}var ne={acceptSuggestionOnCommitCharacter:te(new _(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.a("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:te(new C(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.a("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.a("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:te(new w),accessibilityPageSize:te(new b(3,"accessibilityPageSize",10,1,1073741824,{description:l.a("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:te(new S(4,"ariaLabel",l.a("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:te(new C(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.a("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.a("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.a("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingOvertype:te(new C(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.a("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.a("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:te(new C(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.a("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.a("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.a("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:te(new k(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[l.a("editor.autoIndent.none","The editor will not insert indentation automatically."),l.a("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.a("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.a("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.a("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:l.a("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:te(new _(9,"automaticLayout",!1)),autoSurround:te(new C(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.a("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.a("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.a("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.a("autoSurround","Controls whether the editor should automatically surround selections.")})),codeLens:te(new _(11,"codeLens",!0,{description:l.a("codeLens","Controls whether the editor shows CodeLens.")})),colorDecorators:te(new _(12,"colorDecorators",!0,{description:l.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:te(new _(13,"columnSelection",!1,{description:l.a("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:te(new O),contextmenu:te(new _(15,"contextmenu",!0)),copyWithSyntaxHighlighting:te(new _(16,"copyWithSyntaxHighlighting",!0,{description:l.a("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:te(new k(17,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:l.a("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:te(new _(18,"cursorSmoothCaretAnimation",!1,{description:l.a("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:te(new k(19,"cursorStyle",E.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return E.Line;case"block":return E.Block;case"underline":return E.Underline;case"line-thin":return E.LineThin;case"block-outline":return E.BlockOutline;case"underline-thin":return E.UnderlineThin}}),{description:l.a("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:te(new b(20,"cursorSurroundingLines",0,0,1073741824,{description:l.a("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or `scrollOffset` in some other editors.")})),cursorSurroundingLinesStyle:te(new C(21,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.a("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.a("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:l.a("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:te(new b(22,"cursorWidth",0,0,1073741824,{markdownDescription:l.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:te(new _(23,"disableLayerHinting",!1)),disableMonospaceOptimizations:te(new _(24,"disableMonospaceOptimizations",!1)),dragAndDrop:te(new _(25,"dragAndDrop",!0,{description:l.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:te(new x),extraEditorClassName:te(new S(27,"extraEditorClassName","")),fastScrollSensitivity:te(new y(28,"fastScrollSensitivity",5,(function(e){return e<=0?5:e}),{markdownDescription:l.a("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:te(new N),fixedOverflowWidgets:te(new _(30,"fixedOverflowWidgets",!1)),folding:te(new _(31,"folding",!0,{description:l.a("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:te(new C(32,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.a("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.a("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.a("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:te(new _(33,"foldingHighlight",!0,{description:l.a("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:te(new _(34,"unfoldOnClickAfterEndOfLine",!1,{description:l.a("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:te(new S(35,"fontFamily",X.fontFamily,{description:l.a("fontFamily","Controls the font family.")})),fontInfo:te(new L),fontLigatures2:te(new D),fontSize:te(new A),fontWeight:te(new I),formatOnPaste:te(new _(40,"formatOnPaste",!1,{description:l.a("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:te(new _(41,"formatOnType",!1,{description:l.a("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:te(new _(42,"glyphMargin",!0,{description:l.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:te(new R),hideCursorInOverviewRuler:te(new _(44,"hideCursorInOverviewRuler",!1,{description:l.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:te(new _(45,"highlightActiveIndentGuide",!0,{description:l.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:te(new M),inDiffEditor:te(new _(47,"inDiffEditor",!1)),letterSpacing:te(new y(48,"letterSpacing",X.letterSpacing,(function(e){return y.clamp(e,-5,20)}),{description:l.a("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:te(new j),lineDecorationsWidth:te(new v(50,"lineDecorationsWidth",10)),lineHeight:te(new F),lineNumbers:te(new W),lineNumbersMinChars:te(new b(53,"lineNumbersMinChars",5,1,300)),links:te(new _(54,"links",!0,{description:l.a("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:te(new C(55,"matchBrackets","always",["always","near","never"],{description:l.a("matchBrackets","Highlight matching brackets.")})),minimap:te(new B),mouseStyle:te(new C(57,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:te(new y(58,"mouseWheelScrollSensitivity",1,(function(e){return 0===e?1:e}),{markdownDescription:l.a("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:te(new _(59,"mouseWheelZoom",!1,{markdownDescription:l.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:te(new _(60,"multiCursorMergeOverlapping",!0,{description:l.a("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:te(new k(61,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?c.f?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[l.a("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.a("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.a({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:te(new C(62,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.a("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.a("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.a("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:te(new _(63,"occurrencesHighlight",!0,{description:l.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:te(new _(64,"overviewRulerBorder",!0,{description:l.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:te(new b(65,"overviewRulerLanes",3,0,3)),padding:te(new U),parameterHints:te(new H),peekWidgetDefaultFocus:te(new C(68,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.a("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.a("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.a("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:te(new _(69,"definitionLinkOpensInPeek",!1,{description:l.a("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:te(new V),quickSuggestionsDelay:te(new b(71,"quickSuggestionsDelay",10,0,1073741824,{description:l.a("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:te(new _(72,"readOnly",!1)),renameOnType:te(new _(73,"renameOnType",!1,{description:l.a("renameOnType","Controls whether the editor auto renames on type.")})),renderControlCharacters:te(new _(74,"renderControlCharacters",!1,{description:l.a("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:te(new _(75,"renderIndentGuides",!0,{description:l.a("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:te(new _(76,"renderFinalNewline",!0,{description:l.a("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:te(new C(77,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.a("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:te(new _(78,"renderLineHighlightOnlyWhenFocus",!1,{description:l.a("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused")})),renderValidationDecorations:te(new C(79,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:te(new C(80,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.a("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.a("renderWhitespace.selection","Render whitespace characters only on selected text."),l.a("renderWhitespace.trailing","Render only trailing whitespace characters"),""],description:l.a("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:te(new b(81,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:te(new _(82,"roundedSelection",!0,{description:l.a("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:te(new q),scrollbar:te(new Y),scrollBeyondLastColumn:te(new b(85,"scrollBeyondLastColumn",5,0,1073741824,{description:l.a("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:te(new _(86,"scrollBeyondLastLine",!0,{description:l.a("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:te(new _(87,"scrollPredominantAxis",!0,{description:l.a("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:te(new _(88,"selectionClipboard",!0,{description:l.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:c.d})),selectionHighlight:te(new _(89,"selectionHighlight",!0,{description:l.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:te(new _(90,"selectOnLineNumbers",!0)),showFoldingControls:te(new C(91,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[l.a("showFoldingControls.always","Always show the folding controls."),l.a("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.a("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:te(new _(92,"showUnused",!0,{description:l.a("showUnused","Controls fading out of unused code.")})),showDeprecated:te(new _(113,"showDeprecated",!0,{description:l.a("showDeprecated","Controls strikethrough deprecated variables.")})),snippetSuggestions:te(new C(93,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.a("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.a("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.a("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.a("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.a("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smoothScrolling:te(new _(94,"smoothScrolling",!1,{description:l.a("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:te(new b(95,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:te(new $),suggestFontSize:te(new b(97,"suggestFontSize",0,0,1e3,{markdownDescription:l.a("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:te(new b(98,"suggestLineHeight",0,0,1e3,{markdownDescription:l.a("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")})),suggestOnTriggerCharacters:te(new _(99,"suggestOnTriggerCharacters",!0,{description:l.a("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:te(new C(100,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.a("suggestSelection.first","Always select the first suggestion."),l.a("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:te(new C(101,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.a("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.a("tabCompletion.off","Disable tab completions."),l.a("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.a("tabCompletion","Enables tab completions.")})),tabIndex:te(new b(102,"tabIndex",0,-1,1073741824)),unusualLineTerminators:te(new C(103,"unusualLineTerminators","prompt",["off","prompt","auto"],{enumDescriptions:[l.a("unusualLineTerminators.off","Unusual line terminators are ignored."),l.a("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed."),l.a("unusualLineTerminators.auto","Unusual line terminators are automatically removed.")],description:l.a("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useTabStops:te(new _(104,"useTabStops",!0,{description:l.a("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:te(new S(105,"wordSeparators",u.b,{description:l.a("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:te(new C(106,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.a("wordWrap.off","Lines will never wrap."),l.a("wordWrap.on","Lines will wrap at the viewport width."),l.a({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.a({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:l.a({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:te(new S(107,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;\xa2\xb0\u2032\u2033\u2030\u2103\u3001\u3002\uff61\uff64\uffe0\uff0c\uff0e\uff1a\uff1b\uff1f\uff01\uff05\u30fb\uff65\u309d\u309e\u30fd\u30fe\u30fc\u30a1\u30a3\u30a5\u30a7\u30a9\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308e\u3095\u3096\u31f0\u31f1\u31f2\u31f3\u31f4\u31f5\u31f6\u31f7\u31f8\u31f9\u31fa\u31fb\u31fc\u31fd\u31fe\u31ff\u3005\u303b\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\uff70\u201d\u3009\u300b\u300d\u300f\u3011\u3015\uff09\uff3d\uff5d\uff63")),wordWrapBreakBeforeCharacters:te(new S(108,"wordWrapBreakBeforeCharacters","([{\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\xa3\xa5\uff04\uffe1\uffe5+\uff0b")),wordWrapColumn:te(new b(109,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.a({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:te(new _(110,"wordWrapMinified",!0)),wrappingIndent:te(new k(111,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[l.a("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.a("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.a("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.a("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.a("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:te(new C(112,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[l.a("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."),l.a("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:l.a("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:te(new T),pixelRatio:te(new z),tabFocusMode:te(new Q),layoutInfo:te(new P),wrappingInfo:te(new Z)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return f}));var r=n(6),i=n(0),o=n(1),a=n(7),s=n(33),l=n(29),c=n(12),u=n(99),d=n(55),h=Object(l.c)("commandService"),f=new(function(){function e(){Object(i.a)(this,e),this._commands=new Map,this._onDidRegisterCommand=new c.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return Object(o.a)(e,[{key:"registerCommand",value:function(e,t){var n=this;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){var i,o=[],l=Object(r.a)(e.description.args);try{for(l.s();!(i=l.n()).done;){var c=i.value;o.push(c.constraint)}}catch(m){l.e(m)}finally{l.f()}var d=e.handler;e.handler=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?r-1:0),o=1;o0&&s>0)&&!(c>0&&u>0)){var h=Math.abs(s-u),f=Math.abs(a-c);if(0===h)return i.spacesDiff=f,void(f>0&&0<=c-1&&c-10?i++:m>1&&o++,k(a,s,h,g,c),!c.looksLikeAlignment||n&&t===c.spacesDiff)){var S=c.spacesDiff;S<=8&&l[S]++,a=h,s=g}}var E=n;i!==o&&(E=iO&&(O=t,w=e)})),4===w&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(w=2)}return{insertSpaces:E,tabSize:w}}function w(e){return(1&e.metadata)>>>0}function O(e,t){e.metadata=254&e.metadata|t<<0}function T(e){return(2&e.metadata)>>>1===1}function x(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function N(e){return(4&e.metadata)>>>2===1}function D(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function L(e){return(8&e.metadata)>>>3===1}function A(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function I(e,t){e.metadata=207&e.metadata|t<<4}function R(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}var M=function(){function e(t,n,r){Object(c.a)(this,e),this.metadata=0,this.parent=this,this.left=this,this.right=this,O(this,1),this.start=n,this.end=r,this.delta=0,this.maxEnd=r,this.id=t,this.ownerId=0,this.options=null,D(this,!1),I(this,1),A(this,!1),R(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=n,this.cachedAbsoluteEnd=r,this.range=null,x(this,!1)}return Object(u.a)(e,[{key:"reset",value:function(e,t,n,r){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=r}},{key:"setOptions",value:function(e){this.options=e;var t=this.options.className;D(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),I(this,this.options.stickiness),A(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),R(this,this.options.collapseOnReplaceEdit)}},{key:"setCachedOffsets",value:function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}},{key:"detach",value:function(){this.parent=null,this.left=null,this.right=null}}]),e}(),P=new M(null,0,0);P.parent=P,P.left=P,P.right=P,O(P,0);var j=function(){function e(){Object(c.a)(this,e),this.root=P,this.requestNormalizeDelta=!1}return Object(u.a)(e,[{key:"intervalSearch",value:function(e,t,n,r,i){return this.root===P?[]:function(e,t,n,r,i,o){var a=e.root,s=0,l=0,c=0,u=[],d=0;for(;a!==P;)if(T(a))x(a.left,!1),x(a.right,!1),a===a.parent.right&&(s-=a.parent.delta),a=a.parent;else{if(!T(a.left)){if(s+a.maxEndn)x(a,!0);else{if((c=s+a.end)>=t){a.setCachedOffsets(l,c,o);var h=!0;r&&a.ownerId&&a.ownerId!==r&&(h=!1),i&&N(a)&&(h=!1),h&&(u[d++]=a)}x(a,!0),a.right===P||T(a.right)||(s+=a.delta,a=a.right)}}return x(e.root,!1),u}(this,e,t,n,r,i)}},{key:"search",value:function(e,t,n){return this.root===P?[]:function(e,t,n,r){var i=e.root,o=0,a=0,s=0,l=[],c=0;for(;i!==P;)if(T(i))x(i.left,!1),x(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else if(i.left===P||T(i.left)){a=o+i.start,s=o+i.end,i.setCachedOffsets(a,s,r);var u=!0;t&&i.ownerId&&i.ownerId!==t&&(u=!1),n&&N(i)&&(u=!1),u&&(l[c++]=i),x(i,!0),i.right===P||T(i.right)||(o+=i.delta,i=i.right)}else i=i.left;return x(e.root,!1),l}(this,e,t,n)}},{key:"collectNodesFromOwner",value:function(e){return function(e,t){var n=e.root,r=[],i=0;for(;n!==P;)T(n)?(x(n.left,!1),x(n.right,!1),n=n.parent):n.left===P||T(n.left)?(n.ownerId===t&&(r[i++]=n),x(n,!0),n.right===P||T(n.right)||(n=n.right)):n=n.left;return x(e.root,!1),r}(this,e)}},{key:"collectNodesPostOrder",value:function(){return function(e){var t=e.root,n=[],r=0;for(;t!==P;)T(t)?(x(t.left,!1),x(t.right,!1),t=t.parent):t.left===P||T(t.left)?t.right===P||T(t.right)?(n[r++]=t,x(t,!0)):t=t.right:t=t.left;return x(e.root,!1),n}(this)}},{key:"insert",value:function(e){U(this,e),this._normalizeDeltaIfNecessary()}},{key:"delete",value:function(e){H(this,e),this._normalizeDeltaIfNecessary()}},{key:"resolveNode",value:function(e,t){for(var n=e,r=0;e!==this.root;)e===e.parent.right&&(r+=e.parent.delta),e=e.parent;var i=n.start+r,o=n.end+r;n.setCachedOffsets(i,o,t)}},{key:"acceptReplace",value:function(e,t,n,r){for(var i=function(e,t,n){var r=e.root,i=0,o=0,a=0,s=[],l=0;for(;r!==P;)if(T(r))x(r.left,!1),x(r.right,!1),r===r.parent.right&&(i-=r.parent.delta),r=r.parent;else{if(!T(r.left)){if(i+r.maxEndn?x(r,!0):((a=i+r.end)>=t&&(r.setCachedOffsets(o,a,0),s[l++]=r),x(r,!0),r.right===P||T(r.right)||(i+=r.delta,r=r.right))}return x(e.root,!1),s}(this,e,e+t),o=0,a=i.length;on?(i.start+=a,i.end+=a,i.delta+=a,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),x(i,!0)):(x(i,!0),i.right===P||T(i.right)||(o+=i.delta,i=i.right))}x(e.root,!1)}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(var s=0,l=i.length;sn)&&(1!==r&&(2===r||t))}function B(e,t,n,r,i){var o=function(e){return(48&e.metadata)>>>4}(e),a=0===o||2===o,s=1===o||2===o,l=n-t,c=r,u=Math.min(l,c),d=e.start,h=!1,f=e.end,p=!1;t<=d&&f<=n&&function(e){return(64&e.metadata)>>>6===1}(e)&&(e.start=t,h=!0,e.end=t,p=!0);var g=i?1:l>0?2:0;if(!h&&F(d,a,t,g)&&(h=!0),!p&&F(f,s,t,g)&&(p=!0),u>0&&!i){var m=l>c?2:0;!h&&F(d,a,t+u,m)&&(h=!0),!p&&F(f,s,t+u,m)&&(p=!0)}var v=i?1:0;!h&&F(d,a,n,v)&&(e.start=t+c,h=!0),!p&&F(f,s,n,v)&&(e.end=t+c,p=!0);var _=c-l;h||(e.start=Math.max(0,d+_)),p||(e.end=Math.max(0,f+_)),e.start>e.end&&(e.end=e.start)}function U(e,t){if(e.root===P)return t.parent=P,t.left=P,t.right=P,O(t,0),e.root=t,e.root;!function(e,t){var n=0,r=e.root,i=t.start,o=t.end;for(;;){if(Y(i,o,r.start+n,r.end+n)<0){if(r.left===P){t.start-=n,t.end-=n,t.maxEnd-=n,r.left=t;break}r=r.left}else{if(r.right===P){t.start-=n+r.delta,t.end-=n+r.delta,t.maxEnd-=n+r.delta,r.right=t;break}n+=r.delta,r=r.right}}t.parent=r,t.left=P,t.right=P,O(t,1)}(e,t),K(t.parent);for(var n=t;n!==e.root&&1===w(n.parent);)if(n.parent===n.parent.parent.left){var r=n.parent.parent.right;1===w(r)?(O(n.parent,0),O(r,0),O(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&V(e,n=n.parent),O(n.parent,0),O(n.parent.parent,1),W(e,n.parent.parent))}else{var i=n.parent.parent.left;1===w(i)?(O(n.parent,0),O(i,0),O(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&W(e,n=n.parent),O(n.parent,0),O(n.parent.parent,1),V(e,n.parent.parent))}return O(e.root,0),t}function H(e,t){var n,r;if(t.left===P?(r=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===P?(n=t.left,r=t):((n=(r=function(e){for(;e.left!==P;)e=e.left;return e}(t.right)).right).start+=r.delta,n.end+=r.delta,n.delta+=r.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=t.delta,r.end+=t.delta,r.delta=t.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0)),r===e.root)return e.root=n,O(n,0),t.detach(),z(),q(n),void(e.root.parent=P);var i,o=1===w(r);if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===t?n.parent=r.parent:(r.parent===t?n.parent=r:n.parent=r.parent,r.left=t.left,r.right=t.right,r.parent=t.parent,O(r,w(t)),t===e.root?e.root=r:t===t.parent.left?t.parent.left=r:t.parent.right=r,r.left!==P&&(r.left.parent=r),r.right!==P&&(r.right.parent=r)),t.detach(),o)return K(n.parent),r!==t&&(K(r),K(r.parent)),void z();for(K(n),K(n.parent),r!==t&&(K(r),K(r.parent));n!==e.root&&0===w(n);)n===n.parent.left?(1===w(i=n.parent.right)&&(O(i,0),O(n.parent,1),V(e,n.parent),i=n.parent.right),0===w(i.left)&&0===w(i.right)?(O(i,1),n=n.parent):(0===w(i.right)&&(O(i.left,0),O(i,1),W(e,i),i=n.parent.right),O(i,w(n.parent)),O(n.parent,0),O(i.right,0),V(e,n.parent),n=e.root)):(1===w(i=n.parent.left)&&(O(i,0),O(n.parent,1),W(e,n.parent),i=n.parent.left),0===w(i.left)&&0===w(i.right)?(O(i,1),n=n.parent):(0===w(i.left)&&(O(i.right,0),O(i,1),V(e,i),i=n.parent.left),O(i,w(n.parent)),O(n.parent,0),O(i.left,0),W(e,n.parent),n=e.root));O(n,0),z()}function z(){P.parent=P,P.delta=0,P.start=0,P.end=0}function V(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==P&&(n.left.parent=t),n.parent=t.parent,t.parent===P?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,q(t),q(n)}function W(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==P&&(n.right.parent=t),n.parent=t.parent,t.parent===P?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,q(t),q(n)}function G(e){var t=e.end;if(e.left!==P){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==P){var r=e.right.maxEnd+e.delta;r>t&&(t=r)}return t}function q(e){e.maxEnd=G(e)}function K(e){for(;e!==P;){var t=G(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function Y(e,t,n,r){return e===n?t-r:e-n}var $=n(6),Q=function(){function e(t,n){Object(c.a)(this,e),this.piece=t,this.color=n,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}return Object(u.a)(e,[{key:"next",value:function(){if(this.right!==Z)return X(this.right);for(var e=this;e.parent!==Z&&e.parent.left!==e;)e=e.parent;return e.parent===Z?Z:e.parent}},{key:"prev",value:function(){if(this.left!==Z)return J(this.left);for(var e=this;e.parent!==Z&&e.parent.right!==e;)e=e.parent;return e.parent===Z?Z:e.parent}},{key:"detach",value:function(){this.parent=null,this.left=null,this.right=null}}]),e}(),Z=new Q(null,0);function X(e){for(;e.left!==Z;)e=e.left;return e}function J(e){for(;e.right!==Z;)e=e.right;return e}function ee(e){return e===Z?0:e.size_left+e.piece.length+ee(e.right)}function te(e){return e===Z?0:e.lf_left+e.piece.lineFeedCnt+te(e.right)}function ne(){Z.parent=Z}function re(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==Z&&(n.left.parent=t),n.parent=t.parent,t.parent===Z?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function ie(e,t){var n=t.left;t.left=n.right,n.right!==Z&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===Z?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function oe(e,t){var n,r;if(n=t.left===Z?(r=t).right:t.right===Z?(r=t).left:(r=X(t.right)).right,r===e.root)return e.root=n,n.color=0,t.detach(),ne(),void(e.root.parent=Z);var i=1===r.color;if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===t?(n.parent=r.parent,le(e,n)):(r.parent===t?n.parent=r:n.parent=r.parent,le(e,n),r.left=t.left,r.right=t.right,r.parent=t.parent,r.color=t.color,t===e.root?e.root=r:t===t.parent.left?t.parent.left=r:t.parent.right=r,r.left!==Z&&(r.left.parent=r),r.right!==Z&&(r.right.parent=r),r.size_left=t.size_left,r.lf_left=t.lf_left,le(e,r)),t.detach(),n.parent.left===n){var o=ee(n),a=te(n);if(o!==n.parent.size_left||a!==n.parent.lf_left){var s=o-n.parent.size_left,l=a-n.parent.lf_left;n.parent.size_left=o,n.parent.lf_left=a,se(e,n.parent,s,l)}}if(le(e,n.parent),i)ne();else{for(var c;n!==e.root&&0===n.color;)n===n.parent.left?(1===(c=n.parent.right).color&&(c.color=0,n.parent.color=1,re(e,n.parent),c=n.parent.right),0===c.left.color&&0===c.right.color?(c.color=1,n=n.parent):(0===c.right.color&&(c.left.color=0,c.color=1,ie(e,c),c=n.parent.right),c.color=n.parent.color,n.parent.color=0,c.right.color=0,re(e,n.parent),n=e.root)):(1===(c=n.parent.left).color&&(c.color=0,n.parent.color=1,ie(e,n.parent),c=n.parent.left),0===c.left.color&&0===c.right.color?(c.color=1,n=n.parent):(0===c.left.color&&(c.right.color=0,c.color=1,re(e,c),c=n.parent.left),c.color=n.parent.color,n.parent.color=0,c.left.color=0,ie(e,n.parent),n=e.root));n.color=0,ne()}}function ae(e,t){for(le(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){var n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&re(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ie(e,t.parent.parent))}else{var r=t.parent.parent.left;1===r.color?(t.parent.color=0,r.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&ie(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,re(e,t.parent.parent))}e.root.color=0}function se(e,t,n,r){for(;t!==e.root&&t!==Z;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=r),t=t.parent}function le(e,t){var n=0,r=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=ee((t=t.parent).left)-t.size_left,r=te(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=r}for(;t!==e.root&&(0!==n||0!==r);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=r),t=t.parent}}Z.parent=Z,Z.left=Z,Z.right=Z,Z.color=0;var ce=n(111),ue=65535;function de(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var he=function e(t,n,r,i,o){Object(c.a)(this,e),this.lineStarts=t,this.cr=n,this.lf=r,this.crlf=i,this.isBasicASCII=o};function fe(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[0],r=1,i=0,o=e.length;ithis._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}]),e}(),ve=function(){function e(t){Object(c.a)(this,e),this._limit=t,this._cache=[]}return Object(u.a)(e,[{key:"get",value:function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}},{key:"get2",value:function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null}},{key:"set",value:function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}},{key:"validate",value:function(e){for(var t=!1,n=this._cache,r=0;r=e)&&(n[r]=null,t=!0)}if(t){var o,a=[],s=Object($.a)(n);try{for(s.s();!(o=s.n()).done;){var l=o.value;null!==l&&a.push(l)}}catch(c){s.e(c)}finally{s.f()}this._cache=a}}}]),e}(),_e=function(){function e(t,n,r){Object(c.a)(this,e),this.create(t,n,r)}return Object(u.a)(e,[{key:"create",value:function(e,t,n){this._buffers=[new ge("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Z,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;for(var r=null,i=0,o=e.length;i0){e[i].lineStarts||(e[i].lineStarts=fe(e[i].buffer));var a=new pe(i+1,{line:0,column:0},{line:e[i].lineStarts.length-1,column:e[i].buffer.length-e[i].lineStarts[e[i].lineStarts.length-1]},e[i].lineStarts.length-1,e[i].buffer.length);this._buffers.push(e[i]),r=this.rbInsertRight(r,a)}this._searchCache=new ve(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}},{key:"normalizeEOL",value:function(e){var t=this,n=65535-Math.floor(21845),r=2*n,i="",o=0,a=[];if(this.iterate(this.root,(function(s){var l=t.getNodeContent(s),c=l.length;if(o<=n||o+c0){var s=i.replace(/\r\n|\r|\n/g,e);a.push(new ge(s,fe(s)))}this.create(a,e,!0)}},{key:"getEOL",value:function(){return this._EOL}},{key:"setEOL",value:function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}},{key:"createSnapshot",value:function(e){return new me(this,e)}},{key:"getOffsetAt",value:function(e,t){for(var n=0,r=this.root;r!==Z;)if(r.left!==Z&&r.lf_left+1>=e)r=r.left;else{if(r.lf_left+r.piece.lineFeedCnt+1>=e)return(n+=r.size_left)+(this.getAccumulatedValue(r,e-r.lf_left-2)+t-1);e-=r.lf_left+r.piece.lineFeedCnt,n+=r.size_left+r.piece.length,r=r.right}return n}},{key:"getPositionAt",value:function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,r=e;t!==Z;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var i=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+i.index,0===i.index){var o=r-this.getOffsetAt(n+1,1);return new v.a(n+1,o+1)}return new v.a(n+1,i.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===Z){var a=r-e-this.getOffsetAt(n+1,1);return new v.a(n+1,a+1)}t=t.right}return new v.a(1,1)}},{key:"getValueInRange",value:function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),r=this.nodeAt2(e.endLineNumber,e.endColumn),i=this.getValueInRange2(n,r);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?i:i.replace(/\r\n|\r|\n/g,t):i}},{key:"getValueInRange2",value:function(e,t){if(e.node===t.node){var n=e.node,r=this._buffers[n.piece.bufferIndex].buffer,i=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r.substring(i+e.remainder,i+t.remainder)}var o=e.node,a=this._buffers[o.piece.bufferIndex].buffer,s=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start),l=a.substring(s+e.remainder,s+o.piece.length);for(o=o.next();o!==Z;){var c=this._buffers[o.piece.bufferIndex].buffer,u=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);if(o===t.node){l+=c.substring(u,u+t.remainder);break}l+=c.substr(u,o.piece.length),o=o.next()}return l}},{key:"getLinesContent",value:function(){var e=this,t=[],n=0,r="",i=!1;return this.iterate(this.root,(function(o){if(o===Z)return!0;var a=o.piece,s=a.length;if(0===s)return!0;var l=e._buffers[a.bufferIndex].buffer,c=e._buffers[a.bufferIndex].lineStarts,u=a.start.line,d=a.end.line,h=c[u]+a.start.column;if(i&&(10===l.charCodeAt(h)&&(h++,s--),t[n++]=r,r="",i=!1,0===s))return!0;if(u===d)return e._EOLNormalized||13!==l.charCodeAt(h+s-1)?r+=l.substr(h,s):(i=!0,r+=l.substr(h,s-1)),!0;r+=e._EOLNormalized?l.substring(h,Math.max(h,c[u+1]-e._EOLLength)):l.substring(h,c[u+1]).replace(/(\r\n|\r|\n)$/,""),t[n++]=r;for(var f=u+1;f=v)return c;this.positionInBuffer(e,f(d.index)-g,b);var y=this.getLineFeedCnt(e.piece.bufferIndex,i,b),S=b.line===i.line?b.column-i.column+r:b.column+1,C=S+d[0].length;if(u[c++]=Object(ce.d)(new _.a(n+y,S,n+y,C),d,s),f(d.index)+d[0].length>=v)return c;if(c>=l)return c}}while(d);return c}},{key:"findMatchesLineByLine",value:function(e,t,n,r){var i=[],o=0,a=new ce.b(t.wordSeparators,t.regex),s=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===s)return[];var l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];var c=this.positionInBuffer(s.node,s.remainder),u=this.positionInBuffer(l.node,l.remainder);if(s.node===l.node)return this.findMatchesInNode(s.node,a,e.startLineNumber,e.startColumn,c,u,t,n,r,o,i),i;for(var d=e.startLineNumber,h=s.node;h!==l.node;){var f=this.getLineFeedCnt(h.piece.bufferIndex,c,h.piece.end);if(f>=1){var p=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=p[c.line+f],v=d===e.startLineNumber?e.startColumn:1;if((o=this.findMatchesInNode(h,a,d,v,c,this.positionInBuffer(h,m-g),t,n,r,o,i))>=r)return i;d+=f}var _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var b=this.getLineContent(d).substring(_,e.endColumn-1);return o=this._findMatchesInLine(t,a,b,e.endLineNumber,_,o,i,n,r),i}if((o=this._findMatchesInLine(t,a,this.getLineContent(d).substr(_),d,_,o,i,n,r))>=r)return i;d++,h=(s=this.nodeAt2(d,1)).node,c=this.positionInBuffer(s.node,s.remainder)}if(d===e.endLineNumber){var y=d===e.startLineNumber?e.startColumn-1:0,S=this.getLineContent(d).substring(y,e.endColumn-1);return o=this._findMatchesInLine(t,a,S,e.endLineNumber,y,o,i,n,r),i}var C=d===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,a,d,C,c,u,t,n,r,o,i),i}},{key:"_findMatchesInLine",value:function(e,t,n,r,i,o,a,s,l){var c,u=e.wordSeparators;if(!s&&e.simpleSearch){for(var d=e.simpleSearch,h=d.length,f=n.length,p=-h;-1!==(p=n.indexOf(d,p+h));)if((!u||Object(ce.e)(u,n,f,p,h))&&(a[o++]=new y.b(new _.a(r,p+1+i,r,p+1+h+i),null),o>=l))return o;return o}t.reset(0);do{if((c=t.next(n))&&(a[o++]=Object(ce.d)(new _.a(r,c.index+1+i,r,c.index+1+c[0].length+i),c,s),o>=l))return o}while(c);return o}},{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Z){var r=this.nodeAt(e),i=r.node,o=r.remainder,a=r.nodeStartOffset,s=i.piece,l=s.bufferIndex,c=this.positionInBuffer(i,o);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&a+s.length===e&&t.lengthe){var u=[],d=new pe(s.bufferIndex,c,s.end,this.getLineFeedCnt(s.bufferIndex,c,s.end),this.offsetInBuffer(l,s.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)){var h=this.nodeCharCodeAt(i,o);if(10===h){var f={line:d.start.line+1,column:0};d=new pe(d.bufferIndex,f,d.end,this.getLineFeedCnt(d.bufferIndex,f,d.end),d.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){var p=this.nodeCharCodeAt(i,o-1);if(13===p){var g=this.positionInBuffer(i,o-1);this.deleteNodeTail(i,g),t="\r"+t,0===i.piece.length&&u.push(i)}else this.deleteNodeTail(i,c)}else this.deleteNodeTail(i,c);var m=this.createNewPieces(t);d.length>0&&this.rbInsertRight(i,d);for(var v=i,_=0;_=0;l--)s=this.rbInsertLeft(s,a[l]);this.validateCRLFWithPrevNode(s),this.deleteNodes(n)}},{key:"insertContentToNodeRight",value:function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),r=this.rbInsertRight(t,n[0]),i=r,o=1;o=u))break;s=c+1}return n?(n.line=c,n.column=a-d,null):{line:c,column:a-d}}},{key:"getLineFeedCnt",value:function(e,t,n){if(0===n.column)return n.line-t.line;var r=this._buffers[e].lineStarts;if(n.line===r.length-1)return n.line-t.line;var i=r[n.line+1],o=r[n.line]+n.column;if(i>o+1)return n.line-t.line;var a=o-1;return 13===this._buffers[e].buffer.charCodeAt(a)?n.line-t.line+1:n.line-t.line}},{key:"offsetInBuffer",value:function(e,t){return this._buffers[e].lineStarts[t.line]+t.column}},{key:"deleteNodes",value:function(e){for(var t=0;tue){for(var t=[];e.length>ue;){var n=e.charCodeAt(65534),r=void 0;13===n||n>=55296&&n<=56319?(r=e.substring(0,65534),e=e.substring(65534)):(r=e.substring(0,ue),e=e.substring(ue));var i=fe(r);t.push(new pe(this._buffers.length,{line:0,column:0},{line:i.length-1,column:r.length-i[i.length-1]},i.length-1,r.length)),this._buffers.push(new ge(r,i))}var o=fe(e);return t.push(new pe(this._buffers.length,{line:0,column:0},{line:o.length-1,column:e.length-o[o.length-1]},o.length-1,e.length)),this._buffers.push(new ge(e,o)),t}var a=this._buffers[0].buffer.length,s=fe(e,!1),l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:0,n=this.root,r="",i=this._searchCache.get2(e);if(i){n=i.node;var o=this.getAccumulatedValue(n,e-i.nodeStartLineNumber-1),a=this._buffers[n.piece.bufferIndex].buffer,s=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(i.nodeStartLineNumber+n.piece.lineFeedCnt!==e){var l=this.getAccumulatedValue(n,e-i.nodeStartLineNumber);return a.substring(s+o,s+l-t)}r=a.substring(s+o,s+n.piece.length)}else for(var c=0,u=e;n!==Z;)if(n.left!==Z&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var d=this.getAccumulatedValue(n,e-n.lf_left-2),h=this.getAccumulatedValue(n,e-n.lf_left-1),f=this._buffers[n.piece.bufferIndex].buffer,p=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return c+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:c,nodeStartLineNumber:u-(e-1-n.lf_left)}),f.substring(p+d,p+h-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){var g=this.getAccumulatedValue(n,e-n.lf_left-2),m=this._buffers[n.piece.bufferIndex].buffer,v=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r=m.substring(v+g,v+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,c+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==Z;){var _=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){var b=this.getAccumulatedValue(n,0),y=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return r+=_.substring(y,y+b-t)}var S=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);r+=_.substr(S,n.piece.length),n=n.next()}return r}},{key:"computeBufferMetadata",value:function(){for(var e=this.root,t=1,n=0;e!==Z;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}},{key:"getIndexOf",value:function(e,t){var n=e.piece,r=this.positionInBuffer(e,t),i=r.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var o=this.getLineFeedCnt(e.piece.bufferIndex,n.start,r);if(o!==i)return{index:o,remainder:0}}return{index:i,remainder:r.column}}},{key:"getAccumulatedValue",value:function(e,t){if(t<0)return 0;var n=e.piece,r=this._buffers[n.bufferIndex].lineStarts,i=n.start.line+t+1;return i>n.end.line?r[n.end.line]+n.end.column-r[n.start.line]-n.start.column:r[i]-r[n.start.line]-n.start.column}},{key:"deleteNodeTail",value:function(e,t){var n=e.piece,r=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.end),o=t,a=this.offsetInBuffer(n.bufferIndex,o),s=this.getLineFeedCnt(n.bufferIndex,n.start,o),l=s-r,c=a-i,u=n.length+c;e.piece=new pe(n.bufferIndex,n.start,o,s,u),se(this,e,c,l)}},{key:"deleteNodeHead",value:function(e,t){var n=e.piece,r=n.lineFeedCnt,i=this.offsetInBuffer(n.bufferIndex,n.start),o=t,a=this.getLineFeedCnt(n.bufferIndex,o,n.end),s=a-r,l=i-this.offsetInBuffer(n.bufferIndex,o),c=n.length+l;e.piece=new pe(n.bufferIndex,o,n.end,a,c),se(this,e,l,s)}},{key:"shrinkNode",value:function(e,t,n){var r=e.piece,i=r.start,o=r.end,a=r.length,s=r.lineFeedCnt,l=t,c=this.getLineFeedCnt(r.bufferIndex,r.start,l),u=this.offsetInBuffer(r.bufferIndex,t)-this.offsetInBuffer(r.bufferIndex,i);e.piece=new pe(r.bufferIndex,r.start,l,c,u),se(this,e,u-a,c-s);var d=new pe(r.bufferIndex,n,o,this.getLineFeedCnt(r.bufferIndex,n,o),this.offsetInBuffer(r.bufferIndex,o)-this.offsetInBuffer(r.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h)}},{key:"appendToNode",value:function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),r=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var i=fe(t,!1),o=0;oe)t=t.left;else{if(t.size_left+t.piece.length>=e){r+=t.size_left;var i={node:t,remainder:e-t.size_left,nodeStartOffset:r};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,r+=t.size_left+t.piece.length,t=t.right}return null}},{key:"nodeAt2",value:function(e,t){for(var n=this.root,r=0;n!==Z;)if(n.left!==Z&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var i=this.getAccumulatedValue(n,e-n.lf_left-2),o=this.getAccumulatedValue(n,e-n.lf_left-1);return r+=n.size_left,{node:n,remainder:Math.min(i+t-1,o),nodeStartOffset:r}}if(n.lf_left+n.piece.lineFeedCnt===e-1){var a=this.getAccumulatedValue(n,e-n.lf_left-2);if(a+t-1<=n.piece.length)return{node:n,remainder:a+t-1,nodeStartOffset:r};t-=n.piece.length-a;break}e-=n.lf_left+n.piece.lineFeedCnt,r+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==Z;){if(n.piece.lineFeedCnt>0){var s=this.getAccumulatedValue(n,0),l=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,s),nodeStartOffset:l}}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next()}return null}},{key:"nodeCharCodeAt",value:function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],r=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(r)}},{key:"offsetOfNode",value:function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}},{key:"shouldCheckCRLF",value:function(){return!(this._EOLNormalized&&"\n"===this._EOL)}},{key:"startWithLF",value:function(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===Z||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,r=t.start.line,i=n[r]+t.start.column;return r!==n.length-1&&(!(n[r+1]>i+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(i))}},{key:"endWithCR",value:function(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==Z&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}},{key:"validateCRLFWithPrevNode",value:function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}},{key:"validateCRLFWithNextNode",value:function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}},{key:"fixCRLF",value:function(e,t){var n,r=[],i=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new pe(e.piece.bufferIndex,e.piece.start,n,a,o),se(this,e,-1,-1),0===e.piece.length&&r.push(e);var s={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,s,t.piece.end);t.piece=new pe(t.piece.bufferIndex,s,t.piece.end,c,l),se(this,t,-1,-1),0===t.piece.length&&r.push(t);var u=this.createNewPieces("\r\n");this.rbInsertRight(e,u[0]);for(var d=0;d1&&void 0!==arguments[1]?arguments[1]:0;if(e.isEmpty())return"";var n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)}},{key:"getValueLengthInRange",value:function(e){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;var t=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);return n-t}},{key:"getCharacterCountInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._mightContainNonBasicASCII){for(var n=0,r=e.startLineNumber,i=e.endLineNumber,o=r;o<=i;o++)for(var a=this.getLineContent(o),s=o===r?e.startColumn-1:0,l=o===i?e.endColumn-1:a.length,c=s;c0){D.sort((function(e,t){return t.lineNumber-e.lineNumber})),W=[];for(var G=0,q=D.length;G0&&D[G-1].lineNumber===K)){var Y=D[G].oldContent,$=this.getLineContent(K);0!==$.length&&$!==Y&&-1===p.w($)&&W.push(K)}}}return this._onDidChangeContent.fire(),new y.a(P,V,W)}},{key:"_reduceOperations",value:function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}},{key:"_toSingleEditOperation",value:function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new _.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),a=n.startLineNumber,s=n.startColumn,l=[],c=0,u=e.length;c0&&l.push(d.text),a=h.endLineNumber,s=h.endColumn}var f=l.join(""),p=Object(be.f)(f),g=Object(r.a)(p,3),m=g[0],v=g[1],b=g[2];return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:f,eolCount:m,firstLineLength:v,lastLineLength:b,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}},{key:"_doApplyEdits",value:function(t){t.sort(e._sortOpsDescending);for(var n=[],r=0;r0){var d=s.eolCount+1;u=1===d?new _.a(l,c,l,c+s.firstLineLength):new _.a(l,c,l+d-1,s.lastLineLength+1)}else u=new _.a(l,c,l,c);n=u.endLineNumber,r=u.endColumn,t.push(u),i=s}return t}},{key:"_sortOpsAscending",value:function(e,t){var n=_.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}},{key:"_sortOpsDescending",value:function(e,t){var n=_.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}]),e}(),Ce=function(){function e(t,n,r,i,o,a,s,l,u){Object(c.a)(this,e),this._chunks=t,this._bom=n,this._cr=r,this._lf=i,this._crlf=o,this._containsRTL=a,this._containsUnusualLineTerminators=s,this._isBasicASCII=l,this._normalizeEOL=u}return Object(u.a)(e,[{key:"_getEOL",value:function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}},{key:"create",value:function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var r=0,i=n.length;r=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)}}},{key:"_acceptChunk1",value:function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}},{key:"_acceptChunk2",value:function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,r=0,i=0,o=0,a=!0,s=0,l=t.length;s126)&&(a=!1)}var u=new he(de(e),r,i,o,a);return e.length=0,u}(this._tmpLineStarts,e);this.chunks.push(new ge(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=p.m(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=p.n(e))}},{key:"finish",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._finish(),new Ce(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}},{key:"_finish",value:function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=fe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}]),e}(),Ee=function e(){Object(c.a)(this,e),this.changeType=1},we=function e(t,n){Object(c.a)(this,e),this.changeType=2,this.lineNumber=t,this.detail=n},Oe=function e(t,n){Object(c.a)(this,e),this.changeType=3,this.fromLineNumber=t,this.toLineNumber=n},Te=function e(t,n,r){Object(c.a)(this,e),this.changeType=4,this.fromLineNumber=t,this.toLineNumber=n,this.detail=r},xe=function e(){Object(c.a)(this,e),this.changeType=5},Ne=function(){function e(t,n,r,i){Object(c.a)(this,e),this.changes=t,this.versionId=n,this.isUndoing=r,this.isRedoing=i,this.resultingSelection=null}return Object(u.a)(e,[{key:"containsEvent",value:function(e){for(var t=0,n=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}},{key:"_deleteLines",value:function(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)}},{key:"_insertLines",value:function(e,t){if(0!==t){for(var n=[],r=[],i=0;i=0;i--)this._invalidateLine(e.startLineNumber+i-1);this._acceptDeleteRange(e),this._acceptInsertText(new v.a(e.startLineNumber,e.startColumn),t)}},{key:"_acceptDeleteRange",value:function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}},{key:"_acceptInsertText",value:function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}},{key:"invalidLineStartIndex",get:function(){return this._invalidLineStartIndex}}]),e}(),Fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var i;return Object(c.a)(this,n),(i=t.call(this))._isDisposed=!1,i._textModel=e,i._tokenizationStateStore=new je,i._tokenizationSupport=null,i._register(Ie.C.onDidChange((function(e){var t=i._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(i._resetTokenizationState(),i._textModel.clearTokens())}))),i._register(i._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&i._resetTokenizationState()}))),i._register(i._textModel.onDidChangeContentFast((function(e){for(var t=0,n=e.changes.length;t0&&void 0!==arguments[0]?arguments[0]:this._textModel.getLineCount(),t=1,n=new be.b,r=Me.a.create(!1);this._hasLinesToTokenize()&&!(r.elapsed()>t);){var i=this._tokenizeOneInvalidLine(n);if(i>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(n.tokens)}},{key:"tokenizeViewport",value:function(e,t){var n=new be.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)}},{key:"reset",value:function(){this._resetTokenizationState(),this._textModel.clearTokens()}},{key:"forceTokenization",value:function(e){var t=new be.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}},{key:"isCheapToTokenize",value:function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&a>=1;a--){var s=this._textModel.getLineFirstNonWhitespaceColumn(a);if(0!==s&&s=0;u--){c=Be(l,this._tokenizationSupport,i[u],c).endState}for(var d=t;d<=n;d++){var h=this._textModel.getLineContent(d),f=Be(l,this._tokenizationSupport,h,c);e.add(d,f.tokens),this._tokenizationStateStore.setFakeTokens(d-1),c=f.endState}}}}]),n}(f.a);function Be(e,t,n,r){var i=null;if(t)try{i=t.tokenize2(n,r.clone(),0)}catch(o){Object(d.e)(o)}return i||(i=Object(Re.e)(e.id,n,r,0)),Ae.a.convertToEndOffset(i.tokens,n.length),i}var Ue=n(154),He=n(48),ze=n(120),Ve=n(125),We=n(23);function Ge(e){var t=new ke;return t.acceptChunk(e),t.finish()}function qe(e,t){return("string"===typeof e?Ge(e):e).create(t)}var Ke=0,Ye=function(){function e(t){Object(c.a)(this,e),this._source=t,this._eos=!1}return Object(u.a)(e,[{key:"read",value:function(){if(this._eos)return null;for(var e=[],t=0,n=0;;){var r=this._source.read();if(null===r)return this._eos=!0,0===t?null:e.join("");if(r.length>0&&(e[t++]=r,n+=r.length),n>=65536)return e.join("")}}}]),e}(),$e=function(){throw new Error("Invalid change accessor")},Qe=function e(){Object(c.a)(this,e),this._searchCanceledBrand=void 0};function Ze(e){return e instanceof Qe?null:e}Qe.INSTANCE=new Qe;var Xe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o){var a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,l=arguments.length>4?arguments[4]:void 0;Object(c.a)(this,n),(a=t.call(this))._onWillDispose=a._register(new h.a),a.onWillDispose=a._onWillDispose.event,a._onDidChangeDecorations=a._register(new st),a.onDidChangeDecorations=a._onDidChangeDecorations.event,a._onDidChangeLanguage=a._register(new h.a),a.onDidChangeLanguage=a._onDidChangeLanguage.event,a._onDidChangeLanguageConfiguration=a._register(new h.a),a.onDidChangeLanguageConfiguration=a._onDidChangeLanguageConfiguration.event,a._onDidChangeTokens=a._register(new h.a),a.onDidChangeTokens=a._onDidChangeTokens.event,a._onDidChangeOptions=a._register(new h.a),a.onDidChangeOptions=a._onDidChangeOptions.event,a._onDidChangeAttached=a._register(new h.a),a.onDidChangeAttached=a._onDidChangeAttached.event,a._eventEmitter=a._register(new lt),Ke++,a.id="$model"+Ke,a.isForSimpleWidget=r.isForSimpleWidget,a._associatedResource="undefined"===typeof s||null===s?g.a.parse("inmemory://model/"+Ke):s,a._undoRedoService=l,a._attachedEditorCount=0,a._buffer=qe(e,r.defaultEOL),a._options=n.resolveOptions(a._buffer,r);var u=a._buffer.getLineCount(),d=a._buffer.getValueLengthInRange(new _.a(1,1,u,a._buffer.getLineLength(u)+1),0);return r.largeFileOptimizations?a._isTooLargeForTokenization=d>n.LARGE_FILE_SIZE_THRESHOLD||u>n.LARGE_FILE_LINE_COUNT_THRESHOLD:a._isTooLargeForTokenization=!1,a._isTooLargeForSyncing=d>n.MODEL_SYNC_LIMIT,a._versionId=1,a._alternativeVersionId=1,a._initialUndoRedoSnapshot=null,a._isDisposed=!1,a._isDisposing=!1,a._languageIdentifier=o||Re.a,a._languageRegistryListener=He.a.onDidChange((function(e){e.languageIdentifier.id===a._languageIdentifier.id&&a._onDidChangeLanguageConfiguration.fire({})})),a._instanceId=p.R(Ke),a._lastDecorationId=0,a._decorations=Object.create(null),a._decorationsTree=new Je,a._commandManager=new S.a(Object(i.a)(a),l),a._isUndoing=!1,a._isRedoing=!1,a._trimAutoWhitespaceLines=null,a._tokens=new be.d,a._tokens2=new be.e,a._tokenization=new Fe(Object(i.a)(a)),a}return Object(u.a)(n,[{key:"onDidChangeRawContentFast",value:function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))}},{key:"onDidChangeContentFast",value:function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))}},{key:"onDidChangeContent",value:function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))}},{key:"dispose",value:function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,Object(o.a)(Object(a.a)(n.prototype),"dispose",this).call(this),this._isDisposing=!1}},{key:"_assertNotDisposed",value:function(){if(this._isDisposed)throw new Error("Model is disposed!")}},{key:"_emitContentChangedEvent",value:function(e,t){this._isDisposing||this._eventEmitter.fire(new De(e,t))}},{key:"setValue",value:function(e){if(this._assertNotDisposed(),null!==e){var t=qe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}}},{key:"_createContentChanged2",value:function(e,t,n,r,i,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:i,isRedoing:o,isFlush:a}}},{key:"setValueFromTextBuffer",value:function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),r=this.getLineCount(),i=this.getLineMaxColumn(r);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Je,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Ne([new Ee],this._versionId,!1,!1),this._createContentChanged2(new _.a(1,1,r,i),0,n,this.getValue(),!1,!1,!0))}}},{key:"setEOL",value:function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),r=this.getValueLengthInRange(n),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Ne([new xe],this._versionId,!1,!1),this._createContentChanged2(new _.a(1,1,i,o),0,r,this.getValue(),!1,!1,!1))}}},{key:"_onBeforeEOLChange",value:function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}},{key:"_onAfterEOLChange",value:function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,r=t.length;n0}},{key:"getAttachedEditorCount",value:function(){return this._attachedEditorCount}},{key:"isTooLargeForSyncing",value:function(){return this._isTooLargeForSyncing}},{key:"isTooLargeForTokenization",value:function(){return this._isTooLargeForTokenization}},{key:"isDisposed",value:function(){return this._isDisposed}},{key:"isDominatedByLongLines",value:function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),r=1;r<=n;r++){var i=this._buffer.getLineLength(r);i>=1e4?t+=i:e+=i}return t>e}},{key:"getOptions",value:function(){return this._assertNotDisposed(),this._options}},{key:"getFormattingOptions",value:function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}},{key:"updateOptions",value:function(e){this._assertNotDisposed();var t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,r="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new y.e({tabSize:t,indentSize:n,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var a=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(a)}}},{key:"detectIndentation",value:function(e,t){this._assertNotDisposed();var n=E(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}},{key:"normalizeIndentation",value:function(e){return this._assertNotDisposed(),n.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)}},{key:"getVersionId",value:function(){return this._assertNotDisposed(),this._versionId}},{key:"mightContainRTL",value:function(){return this._buffer.mightContainRTL()}},{key:"mightContainUnusualLineTerminators",value:function(){return this._buffer.mightContainUnusualLineTerminators()}},{key:"removeUnusualLineTerminators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.findMatches(p.a.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((function(e){return{range:e.range,text:null}})),(function(){return null}))}},{key:"mightContainNonBasicASCII",value:function(){return this._buffer.mightContainNonBasicASCII()}},{key:"getAlternativeVersionId",value:function(){return this._assertNotDisposed(),this._alternativeVersionId}},{key:"getOffsetAt",value:function(e){this._assertNotDisposed();var t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}},{key:"getPositionAt",value:function(e){this._assertNotDisposed();var t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}},{key:"_increaseVersionId",value:function(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}},{key:"_overwriteVersionId",value:function(e){this._versionId=e}},{key:"_overwriteAlternativeVersionId",value:function(e){this._alternativeVersionId=e}},{key:"_overwriteInitialUndoRedoSnapshot",value:function(e){this._initialUndoRedoSnapshot=e}},{key:"getValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._assertNotDisposed();var n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._buffer.getBOM()+r:r}},{key:"createSnapshot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Ye(this._buffer.createSnapshot(e))}},{key:"getValueLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._assertNotDisposed();var n=this.getFullModelRange(),r=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+r:r}},{key:"getValueInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}},{key:"getValueLengthInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}},{key:"getCharacterCountInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}},{key:"getLineCount",value:function(){return this._assertNotDisposed(),this._buffer.getLineCount()}},{key:"getLineContent",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}},{key:"getLineLength",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}},{key:"getLinesContent",value:function(){return this._assertNotDisposed(),this._buffer.getLinesContent()}},{key:"getEOL",value:function(){return this._assertNotDisposed(),this._buffer.getEOL()}},{key:"getLineMinColumn",value:function(e){return this._assertNotDisposed(),1}},{key:"getLineMaxColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}},{key:"getLineFirstNonWhitespaceColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}},{key:"getLineLastNonWhitespaceColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}},{key:"_validateRangeRelaxedNoAllocations",value:function(e){var t,n,r=this._buffer.getLineCount(),i=e.startLineNumber,o=e.startColumn;if(i<1)t=1,n=1;else if(i>r)t=r,n=this.getLineMaxColumn(t);else if(t=0|i,o<=1)n=1;else{var a=this.getLineMaxColumn(t);n=o>=a?a:0|o}var s,l,c=e.endLineNumber,u=e.endColumn;if(c<1)s=1,l=1;else if(c>r)s=r,l=this.getLineMaxColumn(s);else if(s=0|c,u<=1)l=1;else{var d=this.getLineMaxColumn(s);l=u>=d?d:0|u}return i===t&&o===n&&c===s&&u===l&&e instanceof _.a&&!(e instanceof b.a)?e:new _.a(t,n,s,l)}},{key:"_isValidPosition",value:function(e,t,n){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;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var r=this._buffer.getLineCharCode(e,t-2);if(p.F(r))return!1}return!0}},{key:"_validatePosition",value:function(e,t,n){var r=Math.floor("number"!==typeof e||isNaN(e)?1:e),i=Math.floor("number"!==typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(r<1)return new v.a(1,1);if(r>o)return new v.a(o,this.getLineMaxColumn(o));if(i<=1)return new v.a(r,1);var a=this.getLineMaxColumn(r);if(i>=a)return new v.a(r,a);if(1===n){var s=this._buffer.getLineCharCode(r,i-2);if(p.F(s))return new v.a(r,i-1)}return new v.a(r,i)}},{key:"validatePosition",value:function(e){return this._assertNotDisposed(),e instanceof v.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}},{key:"_isValidRange",value:function(e,t){var n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,r,0))return!1;if(!this._isValidPosition(i,o,0))return!1;if(1===t){var a=r>1?this._buffer.getLineCharCode(n,r-2):0,s=o>1&&o<=this._buffer.getLineLength(i)?this._buffer.getLineCharCode(i,o-2):0,l=p.F(a),c=p.F(s);return!l&&!c}return!0}},{key:"validateRange",value:function(e){if(this._assertNotDisposed(),e instanceof _.a&&!(e instanceof b.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),r=t.lineNumber,i=t.column,o=n.lineNumber,a=n.column,s=i>1?this._buffer.getLineCharCode(r,i-2):0,l=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,c=p.F(s),u=p.F(l);return c||u?r===o&&i===a?new _.a(r,i-1,o,a-1):c&&u?new _.a(r,i-1,o,a+1):c?new _.a(r,i-1,o,a):new _.a(r,i,o,a+1):new _.a(r,i,o,a)}},{key:"modifyPosition",value:function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}},{key:"getFullModelRange",value:function(){this._assertNotDisposed();var e=this.getLineCount();return new _.a(1,1,e,this.getLineMaxColumn(e))}},{key:"findMatchesLineByLine",value:function(e,t,n,r){return this._buffer.findMatchesLineByLine(e,t,n,r)}},{key:"findMatches",value:function(e,t,n,r,i,o){var a=this,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:999;this._assertNotDisposed();var l=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((function(e){return _.a.isIRange(e)}))&&(l=t.map((function(e){return a.validateRange(e)})))),null===l&&(l=[this.getFullModelRange()]),l=l.sort((function(e,t){return e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn}));var c,u=[];if(u.push(l.reduce((function(e,t){return _.a.areIntersecting(e,t)?e.plusRange(t):(u.push(e),t)}))),!n&&e.indexOf("\n")<0){var d=new ce.a(e,n,r,i),h=d.parseSearchRequest();if(!h)return[];c=function(e){return a.findMatchesLineByLine(e,h,o,s)}}else c=function(t){return ce.c.findMatches(a,new ce.a(e,n,r,i),t,o,s)};return u.map(c).reduce((function(e,t){return e.concat(t)}),[])}},{key:"findNextMatch",value:function(e,t,n,r,i,o){this._assertNotDisposed();var a=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var s=new ce.a(e,n,r,i).parseSearchRequest();if(!s)return null;var l=this.getLineCount(),c=new _.a(a.lineNumber,a.column,l,this.getLineMaxColumn(l)),u=this.findMatchesLineByLine(c,s,o,1);return ce.c.findNextMatch(this,new ce.a(e,n,r,i),a,o),u.length>0?u[0]:(c=new _.a(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),(u=this.findMatchesLineByLine(c,s,o,1)).length>0?u[0]:null)}return ce.c.findNextMatch(this,new ce.a(e,n,r,i),a,o)}},{key:"findPreviousMatch",value:function(e,t,n,r,i,o){this._assertNotDisposed();var a=this.validatePosition(t);return ce.c.findPreviousMatch(this,new ce.a(e,n,r,i),a,o)}},{key:"pushStackElement",value:function(){this._commandManager.pushStackElement()}},{key:"pushEOL",value:function(e){if(("\n"===this.getEOL()?0:1)!==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()}}},{key:"_validateEditOperation",value:function(e){return e instanceof y.f?e:new y.f(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}},{key:"_validateEditOperations",value:function(e){for(var t=[],n=0,r=e.length;nl.endLineNumber,p=l.startLineNumber>h.endLineNumber;if(!f&&!p){c=!0;break}}if(!c){o=!1;break}}if(o)for(var g=0,m=this._trimAutoWhitespaceLines.length;gE.endLineNumber)&&(!(v===E.startLineNumber&&E.startColumn===b&&E.isEmpty()&&w&&w.length>0&&"\n"===w.charAt(0))&&!(v===E.startLineNumber&&1===E.startColumn&&E.isEmpty()&&w&&w.length>0&&"\n"===w.charAt(w.length-1)))){S=!1;break}}if(S){var O=new _.a(v,1,v,b);t.push(new y.f(null,O,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}},{key:"_applyUndo",value:function(e,t,n,r){var i=this,o=e.map((function(e){var t=i.getPositionAt(e.newPosition),n=i.getPositionAt(e.newEnd);return{range:new _.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,n,r)}},{key:"_applyRedo",value:function(e,t,n,r){var i=this,o=e.map((function(e){var t=i.getPositionAt(e.oldPosition),n=i.getPositionAt(e.oldEnd);return{range:new _.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,n,r)}},{key:"_applyUndoRedoEdits",value:function(e,t,n,r,i,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(i)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}},{key:"applyEdits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();var n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_doApplyEdits",value:function(e,t){var n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),a=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==a.length){for(var s=[],l=n,c=0,u=a.length;c0?d.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(d.rangeOffset,d.rangeLength,d.text.length,d.forceMoveMarkers);for(var v=d.range.startLineNumber,_=d.range.endLineNumber,b=_-v,y=p,S=Math.min(b,y),C=y-b,k=S;k>=0;k--){var E=v+k,w=o-l-C+E;s.push(new we(E,this.getLineContent(w)))}if(S1&&void 0!==arguments[1]?arguments[1]:0;this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_changeDecorations",value:function(e,t){var n=this,r={addDecoration:function(t,r){return n._deltaDecorationsImpl(e,[],[{range:t,options:r}])[0]},changeDecoration:function(e,t){n._changeDecorationImpl(e,t)},changeDecorationOptions:function(e,t){n._changeDecorationOptionsImpl(e,at(t))},removeDecoration:function(t){n._deltaDecorationsImpl(e,[t],[])},deltaDecorations:function(t,r){return 0===t.length&&0===r.length?[]:n._deltaDecorationsImpl(e,t,r)}},i=null;try{i=t(r)}catch(o){Object(d.e)(o)}return r.addDecoration=$e,r.changeDecoration=$e,r.changeDecorationOptions=$e,r.removeDecoration=$e,r.deltaDecorations=$e,i}},{key:"deltaDecorations",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_getTrackedRange",value:function(e){return this.getDecorationRange(e)}},{key:"_setTrackedRange",value:function(e,t,n){var r=e?this._decorations[e]:null;if(!r)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:ot[n]}])[0]:null;if(!t)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;var i=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),a=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),o,a,i),r.setOptions(ot[n]),this._decorationsTree.insert(r),r.id}},{key:"removeAllDecorationsWithOwnerId",value:function(e){if(!this._isDisposed)for(var t=this._decorationsTree.collectNodesFromOwner(e),n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}},{key:"getLinesDecorations",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.getLineCount(),o=Math.min(i,Math.max(1,e)),a=Math.min(i,Math.max(1,t)),s=this.getLineMaxColumn(a);return this._getDecorationsInRange(new _.a(o,1,a,s),n,r)}},{key:"getDecorationsInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.validateRange(e);return this._getDecorationsInRange(r,t,n)}},{key:"getOverviewRulerDecorations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getVersionId(),r=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(r)}},{key:"getAllDecorations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getVersionId(),r=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(r)}},{key:"_getDecorationsInRange",value:function(e,t,n){var r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),i=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),o=this.getVersionId(),a=this._decorationsTree.intervalSearch(r,i,t,n,o);return this._ensureNodesHaveRanges(a)}},{key:"_ensureNodesHaveRanges",value:function(e){for(var t=0,n=e.length;t0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}}},{key:"setSemanticTokens",value:function(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}},{key:"hasSemanticTokens",value:function(){return this._tokens2.isComplete()}},{key:"setPartialSemanticTokens",value:function(e,t){if(!this.hasSemanticTokens()){var n=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}}},{key:"tokenizeViewport",value:function(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}},{key:"clearTokens",value:function(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}},{key:"_emitModelTokensChangedEvent",value:function(e){this._isDisposing||this._onDidChangeTokens.fire(e)}},{key:"resetTokenization",value:function(){this._tokenization.reset()}},{key:"forceTokenization",value:function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}},{key:"isCheapToTokenize",value:function(e){return this._tokenization.isCheapToTokenize(e)}},{key:"tokenizeIfCheap",value:function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}},{key:"getLineTokens",value:function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}},{key:"_getLineTokens",value:function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)}},{key:"getLanguageIdentifier",value:function(){return this._languageIdentifier}},{key:"getModeId",value:function(){return this._languageIdentifier.language}},{key:"setMode",value:function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}}},{key:"getLanguageIdAtPosition",value:function(e,t){var n=this.validatePosition(new v.a(e,t)),r=this.getLineTokens(n.lineNumber);return r.getLanguageId(r.findTokenIndexAtOffset(n.column-1))}},{key:"getWordAtPosition",value:function(e){this._assertNotDisposed();var t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),o=this._getLineTokens(t.lineNumber),a=o.findTokenIndexAtOffset(t.column-1),s=n._findLanguageBoundaries(o,a),l=Object(r.a)(s,2),c=l[0],u=l[1],d=Object(Ue.d)(t.column,He.a.getWordDefinition(o.getLanguageId(a)),i.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d;if(a>0&&c===t.column-1){var h=n._findLanguageBoundaries(o,a-1),f=Object(r.a)(h,2),p=f[0],g=f[1],m=Object(Ue.d)(t.column,He.a.getWordDefinition(o.getLanguageId(a-1)),i.substring(p,g),p);if(m&&m.startColumn<=e.column&&e.column<=m.endColumn)return m}return null}},{key:"getWordUntilPosition",value:function(e){var 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}}},{key:"findMatchingBracketUp",value:function(e,t){var n=e.toLowerCase(),r=this.validatePosition(t),i=this._getLineTokens(r.lineNumber),o=i.getLanguageId(i.findTokenIndexAtOffset(r.column-1)),a=He.a.getBracketsSupport(o);if(!a)return null;var s=a.textIsBracket[n];return s?Ze(this._findMatchingBracketUp(s,r,null)):null}},{key:"matchBracket",value:function(e){return this._matchBracket(this.validatePosition(e))}},{key:"_matchBracket",value:function(e){var t=e.lineNumber,n=this._getLineTokens(t),r=n.getCount(),i=this._buffer.getLineContent(t),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;var a=He.a.getBracketsSupport(n.getLanguageId(o));if(a&&!Object(ze.b)(n.getStandardTokenType(o))){for(var s=Math.max(0,e.column-1-a.maxBracketLength),l=o-1;l>=0;l--){var c=n.getEndOffset(l);if(c<=s)break;Object(ze.b)(n.getStandardTokenType(l))&&(s=c)}for(var u=Math.min(i.length,e.column-1+a.maxBracketLength),d=null;;){var h=Ve.a.findNextBracketInRange(a.forwardRegex,t,i,s,u);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){var f=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,a.textIsBracket[f],a.textIsOpenBracket[f],null);if(p){if(p instanceof Qe)return null;d=p}}s=h.endColumn-1}if(d)return d}if(o>0&&n.getStartOffset(o)===e.column-1){var g=o-1,m=He.a.getBracketsSupport(n.getLanguageId(g));if(m&&!Object(ze.b)(n.getStandardTokenType(g))){for(var v=Math.max(0,e.column-1-m.maxBracketLength),_=Math.min(i.length,e.column-1+m.maxBracketLength),b=g+1;b=_)break;Object(ze.b)(n.getStandardTokenType(b))&&(_=y)}var S=Ve.a.findPrevBracketInRange(m.reversedRegex,t,i,v,_);if(S&&S.startColumn<=e.column&&e.column<=S.endColumn){var C=i.substring(S.startColumn-1,S.endColumn-1).toLowerCase(),k=this._matchFoundBracket(S,m.textIsBracket[C],m.textIsOpenBracket[C],null);if(k)return k instanceof Qe?null:k}}}return null}},{key:"_matchFoundBracket",value:function(e,t,n,r){if(!t)return null;var i=n?this._findMatchingBracketDown(t,e.getEndPosition(),r):this._findMatchingBracketUp(t,e.getStartPosition(),r);return i?i instanceof Qe?i:[e,i]:null}},{key:"_findMatchingBracketUp",value:function(e,t,n){for(var r=e.languageIdentifier.id,i=e.reversedRegex,o=-1,a=0,s=function(t,r,s,l){for(;;){if(n&&++a%100===0&&!n())return Qe.INSTANCE;var c=Ve.a.findPrevBracketInRange(i,t,r,s,l);if(!c)break;var u=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return c;l=c.startColumn-1}return null},l=t.lineNumber;l>=1;l--){var c=this._getLineTokens(l),u=c.getCount(),d=this._buffer.getLineContent(l),h=u-1,f=d.length,p=d.length;l===t.lineNumber&&(h=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,p=t.column-1);for(var g=!0;h>=0;h--){var m=c.getLanguageId(h)===r&&!Object(ze.b)(c.getStandardTokenType(h));if(m)g?f=c.getStartOffset(h):(f=c.getStartOffset(h),p=c.getEndOffset(h));else if(g&&f!==p){var v=s(l,d,f,p);if(v)return v}g=m}if(g&&f!==p){var _=s(l,d,f,p);if(_)return _}}return null}},{key:"_findMatchingBracketDown",value:function(e,t,n){for(var r=e.languageIdentifier.id,i=e.forwardRegex,o=1,a=0,s=function(t,r,s,l){for(;;){if(n&&++a%100===0&&!n())return Qe.INSTANCE;var c=Ve.a.findNextBracketInRange(i,t,r,s,l);if(!c)break;var u=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return c;s=c.endColumn-1}return null},l=this.getLineCount(),c=t.lineNumber;c<=l;c++){var u=this._getLineTokens(c),d=u.getCount(),h=this._buffer.getLineContent(c),f=0,p=0,g=0;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,g=t.column-1);for(var m=!0;f=1;i--){var o=this._getLineTokens(i),a=o.getCount(),s=this._buffer.getLineContent(i),l=a-1,c=s.length,u=s.length;if(i===t.lineNumber){l=o.findTokenIndexAtOffset(t.column-1),c=t.column-1,u=t.column-1;var d=o.getLanguageId(l);n!==d&&(n=d,r=He.a.getBracketsSupport(n))}for(var h=!0;l>=0;l--){var f=o.getLanguageId(l);if(n!==f){if(r&&h&&c!==u){var p=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(p)return this._toFoundBracket(r,p);h=!1}n=f,r=He.a.getBracketsSupport(n)}var g=!!r&&!Object(ze.b)(o.getStandardTokenType(l));if(g)h?c=o.getStartOffset(l):(c=o.getStartOffset(l),u=o.getEndOffset(l));else if(r&&h&&c!==u){var m=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(m)return this._toFoundBracket(r,m)}h=g}if(r&&h&&c!==u){var v=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(v)return this._toFoundBracket(r,v)}}return null}},{key:"findNextBracket",value:function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),r=-1,i=null,o=t.lineNumber;o<=n;o++){var a=this._getLineTokens(o),s=a.getCount(),l=this._buffer.getLineContent(o),c=0,u=0,d=0;if(o===t.lineNumber){c=a.findTokenIndexAtOffset(t.column-1),u=t.column-1,d=t.column-1;var h=a.getLanguageId(c);r!==h&&(r=h,i=He.a.getBracketsSupport(r))}for(var f=!0;ci)throw new Error("Illegal value for lineNumber");for(var o=He.a.getFoldingRules(this._languageIdentifier.id),a=Boolean(o&&o.offSide),s=-2,l=-1,c=-2,u=-1,d=function(e){if(-1!==s&&(-2===s||s>e-1)){s=-1,l=-1;for(var t=e-2;t>=0;t--){var n=r._computeIndentLevel(t);if(n>=0){s=t,l=n;break}}}if(-2===c){c=-1,u=-1;for(var o=e;o=0){c=o,u=a;break}}}},h=-2,f=-1,p=-2,g=-1,m=function(e){if(-2===h){h=-1,f=-1;for(var t=e-2;t>=0;t--){var n=r._computeIndentLevel(t);if(n>=0){h=t,f=n;break}}}if(-1!==p&&(-2===p||p=0){p=o,g=a;break}}}},v=0,_=!0,b=0,y=!0,S=0,C=0,k=0;_||y;k++){var E=e-k,w=e+k;k>1&&(E<1||E1&&(w>i||w>n)&&(y=!1),k>5e4&&(_=!1,y=!1);var O=-1;if(_){var T=this._computeIndentLevel(E-1);T>=0?(c=E-1,u=T,O=Math.ceil(T/this._options.indentSize)):(d(E),O=this._getIndentLevelForWhitespaceLine(a,l,u))}var x=-1;if(y){var N=this._computeIndentLevel(w-1);N>=0?(h=w-1,f=N,x=Math.ceil(N/this._options.indentSize)):(m(w),x=this._getIndentLevelForWhitespaceLine(a,f,g))}if(0!==k){if(1===k){if(w<=i&&x>=0&&C+1===x){_=!1,v=w,b=w,S=x;continue}if(E>=1&&O>=0&&O-1===C){y=!1,v=E,b=E,S=O;continue}if(v=e,b=e,0===(S=C))return{startLineNumber:v,endLineNumber:b,indent:S}}_&&(O>=S?v=E:_=!1),y&&(x>=S?b=w:y=!1)}else C=O}return{startLineNumber:v,endLineNumber:b,indent:S}}},{key:"getLinesIndentGuides",value:function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var r=He.a.getFoldingRules(this._languageIdentifier.id),i=Boolean(r&&r.offSide),o=new Array(t-e+1),a=-2,s=-1,l=-2,c=-1,u=e;u<=t;u++){var d=u-e,h=this._computeIndentLevel(u-1);if(h>=0)a=u-1,s=h,o[d]=Math.ceil(h/this._options.indentSize);else{if(-2===a){a=-1,s=-1;for(var f=u-2;f>=0;f--){var p=this._computeIndentLevel(f);if(p>=0){a=f,s=p;break}}}if(-1!==l&&(-2===l||l=0){l=g,c=m;break}}}o[d]=this._getIndentLevelForWhitespaceLine(i,s,c)}}return o}},{key:"_getIndentLevelForWhitespaceLine",value:function(e,t,n){return-1===t||-1===n?0:t=0&&e.getLanguageId(i)===n;i--)r=e.getStartOffset(i);for(var o=e.getLineContent().length,a=t,s=e.getCount();a0&&void 0!==arguments[0]?arguments[0]:null;if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;var t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}},{key:"fire",value:function(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}]),n}(f.a)},function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"n",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"l",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return v})),n.d(t,"m",(function(){return _})),n.d(t,"i",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"k",(function(){return S}));var r=n(0),i=n(1),o=n(12),a=function(){function e(){Object(r.a)(this,e),this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new o.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}return Object(i.a)(e,[{key:"getZoomLevel",value:function(){return this._zoomLevel}},{key:"getTimeSinceLastZoomLevelChanged",value:function(){return Date.now()-this._lastZoomLevelChangeTime}},{key:"getZoomFactor",value:function(){return this._zoomFactor}},{key:"getPixelRatio",value:function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}]),e}();function s(){return a.INSTANCE.getZoomLevel()}function l(){return a.INSTANCE.getTimeSinceLastZoomLevelChanged()}function c(e){return a.INSTANCE.onDidChangeZoomLevel(e)}function u(){return a.INSTANCE.getZoomFactor()}function d(){return a.INSTANCE.getPixelRatio()}a.INSTANCE=new a;var h=navigator.userAgent,f=h.indexOf("Edge/")>=0,p=h.indexOf("Firefox")>=0,g=h.indexOf("AppleWebKit")>=0,m=h.indexOf("Chrome")>=0,v=!m&&h.indexOf("Safari")>=0,_=!m&&!v&&g,b=h.indexOf("iPad")>=0||v&&navigator.maxTouchPoints>0,y=f&&h.indexOf("WebView/")>=0,S=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(1),o=n(3),a=function(){function e(t){Object(r.a)(this,e),this.domNode=t,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=""}return Object(i.a)(e,[{key:"setMaxWidth",value:function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}},{key:"setWidth",value:function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}},{key:"setHeight",value:function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}},{key:"setTop",value:function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}},{key:"unsetTop",value:function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}},{key:"setLeft",value:function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}},{key:"setBottom",value:function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}},{key:"setRight",value:function(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}},{key:"setFontFamily",value:function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}},{key:"setFontWeight",value:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}},{key:"setFontSize",value:function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}},{key:"setFontFeatureSettings",value:function(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}},{key:"setLineHeight",value:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}},{key:"setLetterSpacing",value:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}},{key:"setClassName",value:function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}},{key:"toggleClassName",value:function(e,t){o.toggleClass(this.domNode,e,t),this._className=this.domNode.className}},{key:"setDisplay",value:function(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}},{key:"setPosition",value:function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}},{key:"setVisibility",value:function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}},{key:"setBackgroundColor",value:function(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}},{key:"setLayerHinting",value:function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}},{key:"setBoxShadow",value:function(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}},{key:"setContain",value:function(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}},{key:"setAttribute",value:function(e,t){this.domNode.setAttribute(e,t)}},{key:"removeAttribute",value:function(e){this.domNode.removeAttribute(e)}},{key:"appendChild",value:function(e){this.domNode.appendChild(e.domNode)}},{key:"removeChild",value:function(e){this.domNode.removeChild(e.domNode)}}]),e}();function s(e){return new a(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(22),i=n(0),o=n(1),a=n(12),s=n(7),l=n(15),c=n(154),u=n(82),d=n(120),h=function(){function e(t){if(Object(i.a)(this,e),t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new u.b(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){return new u.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var n=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new u.b({open:n.open,close:n.close||""}))}this._autoCloseBefore="string"===typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return Object(o.a)(e,[{key:"getAutoClosingPairs",value:function(){return this._autoClosingPairs}},{key:"getAutoCloseBeforeSet",value:function(){return this._autoCloseBefore}},{key:"getSurroundingPairs",value:function(){return this._surroundingPairs}}],[{key:"shouldAutoClosePair",value:function(e,t,n){if(0===t.getTokenCount())return!0;var r=t.findTokenIndexAtOffset(n-2),i=t.getStandardTokenType(r);return e.isOK(i)}}]),e}();h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var f=n(6),p=n(125),g=function(){function e(t){Object(i.a)(this,e),this._richEditBrackets=t}return Object(o.a)(e,[{key:"getElectricCharacters",value:function(){var e=[];if(this._richEditBrackets){var t,n=Object(f.a)(this._richEditBrackets.brackets);try{for(n.s();!(t=n.n()).done;){var r,i=t.value,o=Object(f.a)(i.close);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.charAt(a.length-1);e.push(s)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}}return e=e.filter((function(e,t,n){return n.indexOf(e)===t}))}},{key:"onElectricCharacter",value:function(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;var r=t.findTokenIndexAtOffset(n-1);if(Object(d.b)(t.getStandardTokenType(r)))return null;var i=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,n-1)+e,a=p.a.findPrevBracketInRange(i,1,o,0,o.length);if(!a)return null;var s=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;var l=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:s}:null}}]),e}(),m=function(){function e(t){Object(i.a)(this,e),this._indentationRules=t}return Object(o.a)(e,[{key:"shouldIncrease",value:function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))}},{key:"shouldDecrease",value:function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))}},{key:"shouldIndentNextLine",value:function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))}},{key:"shouldIgnore",value:function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))}},{key:"getIndentMetadata",value:function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}]),e}(),v=n(25),_=function(){function e(t){var n=this;Object(i.a)(this,e),(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach((function(t){var r=e._createOpenBracketRegExp(t[0]),i=e._createCloseBracketRegExp(t[1]);r&&i&&n._brackets.push({open:t[0],openRegExp:r,close:t[1],closeRegExp:i})})),this._regExpRules=t.onEnterRules||[]}return Object(o.a)(e,[{key:"onEnter",value:function(e,t,n,r){if(e>=3)for(var i=0,o=this._regExpRules.length;i=2&&n.length>0&&r.length>0)for(var s=0,l=this._brackets.length;s=2&&n.length>0)for(var d=0,h=this._brackets.length;d1){var i,o=-1;for(i=t-1;i>=1;i--){if(e.getLanguageIdAtPosition(i,0)!==r)return o;var a=e.getLineContent(i);if(!n.shouldIgnore(a)&&!/^\s+$/.test(a)&&""!==a)return i;o=i}}return-1}},{key:"getInheritIndentForLine",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e<4)return null;var i=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!i)return null;if(n<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(t,n,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var a=t.getLineContent(o);if(i.shouldIncrease(a)||i.shouldIndentNextLine(a))return{indentation:l.z(a),action:u.a.Indent,line:o};if(i.shouldDecrease(a))return{indentation:l.z(a),action:null,line:o};if(1===o)return{indentation:l.z(t.getLineContent(o)),action:null,line:o};var s=o-1,c=i.getIndentMetadata(t.getLineContent(s));if(!(3&c)&&4&c){for(var d=0,h=s-1;h>0;h--)if(!i.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:l.z(t.getLineContent(d+1)),action:null,line:d+1}}if(r)return{indentation:l.z(t.getLineContent(o)),action:null,line:o};for(var f=o;f>0;f--){var p=t.getLineContent(f);if(i.shouldIncrease(p))return{indentation:l.z(p),action:u.a.Indent,line:f};if(i.shouldIndentNextLine(p)){for(var g=0,m=f-1;m>0;m--)if(!i.shouldIndentNextLine(t.getLineContent(f))){g=m;break}return{indentation:l.z(t.getLineContent(g+1)),action:null,line:g+1}}if(i.shouldDecrease(p))return{indentation:l.z(p),action:null,line:f}}return{indentation:l.z(t.getLineContent(1)),action:null,line:1}}},{key:"getGoodIndentForLine",value:function(e,t,n,r,i){if(e<4)return null;var o=this._getRichEditSupport(n);if(!o)return null;var a=this.getIndentRulesSupport(n);if(!a)return null;var s=this.getInheritIndentForLine(e,t,r),c=t.getLineContent(r);if(s){var d=s.line;if(void 0!==d){var h=o.onEnter(e,"",t.getLineContent(d),"");if(h){var f=l.z(t.getLineContent(d));return h.removeText&&(f=f.substring(0,f.length-h.removeText)),h.indentAction===u.a.Indent||h.indentAction===u.a.IndentOutdent?f=i.shiftIndent(f):h.indentAction===u.a.Outdent&&(f=i.unshiftIndent(f)),a.shouldDecrease(c)&&(f=i.unshiftIndent(f)),h.appendText&&(f+=h.appendText),l.z(f)}}return a.shouldDecrease(c)?s.action===u.a.Indent?s.indentation:i.unshiftIndent(s.indentation):s.action===u.a.Indent?i.shiftIndent(s.indentation):s.indentation}return null}},{key:"getIndentForEnter",value:function(e,t,n,r){if(e<4)return null;t.forceTokenization(n.startLineNumber);var i,o,a=t.getLineTokens(n.startLineNumber),s=Object(d.a)(a,n.startColumn-1),c=s.getLineContent(),h=!1;(s.firstCharOffset>0&&a.getLanguageId(0)!==s.languageId?(h=!0,i=c.substr(0,n.startColumn-1-s.firstCharOffset)):i=a.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?o=c.substr(n.startColumn-1-s.firstCharOffset):o=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-s.firstCharOffset);var f=this.getIndentRulesSupport(s.languageId);if(!f)return null;var p=i,g=l.z(i),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?p:t.getLineContent(e)}},v=l.z(a.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===u.a.Indent&&(y=r.shiftIndent(y)),f.shouldDecrease(o)&&(y=r.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}}},{key:"getIndentActionForType",value:function(e,t,n,r,i){if(e<4)return null;var o=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),a=this.getIndentRulesSupport(o.languageId);if(!a)return null;var s,l=o.getLineContent(),c=l.substr(0,n.startColumn-1-o.firstCharOffset);n.isEmpty()?s=l.substr(n.startColumn-1-o.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset);if(!a.shouldDecrease(c+s)&&a.shouldDecrease(c+r+s)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==u.a.Indent&&(h=i.unshiftIndent(h)),h}return null}},{key:"getIndentMetadata",value:function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},{key:"getEnterAction",value:function(e,t,n){var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),i=this._getRichEditSupport(r.languageId);if(!i)return null;var o,a=r.getLineContent(),s=a.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?o=a.substr(n.startColumn-1-r.firstCharOffset):o=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);var l="";if(n.startLineNumber>1&&0===r.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===r.languageId&&(l=c.getLineContent())}var d=i.onEnter(e,l,s,o);if(!d)return null;var h=d.indentAction,f=d.appendText,p=d.removeText||0;f||(f=h===u.a.Indent||h===u.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return p&&(g=g.substring(0,g.length-p)),{indentAction:h,appendText:f,removeText:p,indentation:g}}},{key:"getIndentationAtPosition",value:function(e,t,n){var r=e.getLineContent(t),i=l.z(r);return i.length>n-1&&(i=i.substring(0,n-1)),i}},{key:"getScopedLineTokens",value:function(e,t,n){e.forceTokenization(t);var r=e.getLineTokens(t),i="undefined"===typeof n?e.getLineMaxColumn(t)-1:n-1;return Object(d.a)(r,i)}},{key:"getBracketsSupport",value:function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null}}]),e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("codeEditorService")},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n0;){var n=t.shift();for(var r in Object.freeze(n),n)if(s.call(n,r)){var i=n[r];"object"!==typeof i||Object.isFrozen(i)||t.push(i)}}return e}var s=Object.prototype.hasOwnProperty;function l(e,t){return c(e,t,new Set)}function c(e,t,n){if(Object(i.l)(e))return e;var o=t(e);if("undefined"!==typeof o)return o;if(Object(i.e)(e)){var a,l=[],u=Object(r.a)(e);try{for(u.s();!(a=u.n()).done;){var d=a.value;l.push(c(d,t,n))}}catch(p){u.e(p)}finally{u.f()}return l}if(Object(i.i)(e)){if(n.has(e))throw new Error("Cannot clone recursive data-structure");n.add(e);var h={};for(var f in e)s.call(e,f)&&(h[f]=c(e[f],t,n));return n.delete(e),h}return e}function u(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(i.i)(e)?(Object(i.i)(t)&&Object.keys(t).forEach((function(r){r in e?n&&(Object(i.i)(e[r])&&Object(i.i)(t[r])?u(e[r],t[r],n):e[r]=t[r]):e[r]=t[r]})),e):t}function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,r=[];if(0===n)return[r,t];for(var o=t[Symbol.iterator](),a=0;a>>0)>>>0}function h(e,t){if(0===e)return null;var n=(65535&e)>>>0,r=(4294901760&e)>>>16;return new g(0!==r?[f(n,t),f(r,t)]:[f(n,t)])}function f(e,t){var n=!!(2048&e),r=!!(256&e);return new p(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}!function(){function e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;l.define(e,t),c.define(e,n),u.define(e,r)}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){e.toString=function(e){return l.keyCodeToStr(e)},e.fromString=function(e){return l.strToKeyCode(e)},e.toUserSettingsUS=function(e){return c.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return u.keyCodeToStr(e)},e.fromUserSettings=function(e){return c.strToKeyCode(e)||u.strToKeyCode(e)}}(r||(r={}));var p=function(){function e(t,n,r,o,a){Object(i.a)(this,e),this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=o,this.keyCode=a}return Object(o.a)(e,[{key:"equals",value:function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}},{key:"isModifierKey",value:function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}},{key:"toChord",value:function(){return new g([this])}},{key:"isDuplicateModifierCase",value:function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}]),e}(),g=function e(t){if(Object(i.a)(this,e),0===t.length)throw Object(a.b)("parts");this.parts=t},m=function e(t,n,r,o,a,s){Object(i.a)(this,e),this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=o,this.keyLabel=a,this.keyAriaLabel=s},v=function e(){Object(i.a)(this,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(76),o=n(29),a=(i.a,Object(o.c)("notificationService")),s=function e(){Object(r.a)(this,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("keybindingService")},function(e,t,n){"use strict";n.d(t,"i",(function(){return h})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return g})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return y})),n.d(t,"j",(function(){return S})),n.d(t,"k",(function(){return C})),n.d(t,"a",(function(){return f}));var r=n(22),i=n(0),o=n(1),a=n(232),s=n(64),l=n(39),c=n(15),u=n(53),d=n(21);function h(e){return Object(l.b)(e,!0)}var f,p=new(function(){function e(t){Object(i.a)(this,e),this._ignorePathCasing=t}return Object(o.a)(e,[{key:"compare",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t?0:Object(c.f)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}},{key:"isEqual",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}},{key:"getComparisonKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}},{key:"joinPath",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=65&&e<=90||e>=97&&e<=122}function v(e,t,n,r){for(var i="",o=0,a=-1,s=0,u=0,d=0;d<=e.length;++d){if(d2){var h=i.lastIndexOf(n);-1===h?(i="",o=0):o=(i=i.slice(0,h)).length-1-i.lastIndexOf(n),a=d,s=0;continue}if(0!==i.length){i="",o=0,a=d,s=0;continue}}t&&(i+=i.length>0?"".concat(n,".."):"..",o=2)}else i.length>0?i+="".concat(n).concat(e.slice(a+1,d)):i=e.slice(a+1,d),o=d-a-1;a=d,s=0}else u===l&&-1!==s?++s:s=-1}return i}function _(e,t){if(null===t||"object"!==typeof t)throw new h("pathObject","Object",t);var n=t.dir||t.root,r=t.base||"".concat(t.name||"").concat(t.ext||"");return n?n===t.root?"".concat(n).concat(r):"".concat(n).concat(e).concat(r):r}var b={resolve:function(){for(var e="",t="",n=!1,r=arguments.length-1;r>=-1;r--){var i=void 0;if(r>=0){if(f(i=r<0||arguments.length<=r?void 0:arguments[r],"path"),0===i.length)continue}else 0===e.length?i=s.a():(void 0===(i=s.b["=".concat(e)]||s.a())||i.slice(0,2).toLowerCase()!==e.toLowerCase()&&i.charCodeAt(2)===u)&&(i="".concat(e,"\\"));var o=i.length,a=0,l="",c=!1,h=i.charCodeAt(0);if(1===o)p(h)&&(a=1,c=!0);else if(p(h))if(c=!0,p(i.charCodeAt(1))){for(var g=2,_=g;g2&&p(i.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t="".concat(i.slice(a),"\\").concat(t),n=c,c&&e.length>0)break}return t=v(t,!n,"\\",p),n?"".concat(e,"\\").concat(t):"".concat(e).concat(t)||"."},normalize:function(e){f(e,"path");var t=e.length;if(0===t)return".";var n,r=0,i=!1,o=e.charCodeAt(0);if(1===t)return g(o)?"\\":e;if(p(o))if(i=!0,p(e.charCodeAt(1))){for(var a=2,s=a;a2&&p(e.charCodeAt(2))&&(i=!0,r=3));var c=r0&&p(e.charCodeAt(t-1))&&(c+="\\"),void 0===n?i?"\\".concat(c):c:i?"".concat(n,"\\").concat(c):"".concat(n).concat(c)},isAbsolute:function(e){f(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return p(n)||t>2&&m(n)&&e.charCodeAt(1)===d&&p(e.charCodeAt(2))},join:function(){if(0===arguments.length)return".";for(var e,t,n=0;n0&&(void 0===e?e=t=r:e+="\\".concat(r))}if(void 0===e)return".";var i=!0,o=0;if("string"===typeof t&&p(t.charCodeAt(0))){++o;var a=t.length;a>1&&p(t.charCodeAt(1))&&(++o,a>2&&(p(t.charCodeAt(2))?++o:i=!1))}if(i){for(;o=2&&(e="\\".concat(e.slice(o)))}return b.normalize(e)},relative:function(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";var n=b.resolve(e),r=b.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";for(var i=0;ii&&e.charCodeAt(o-1)===u;)o--;for(var a=o-i,s=0;ss&&t.charCodeAt(l-1)===u;)l--;for(var c=l-s,d=ad){if(t.charCodeAt(s+p)===u)return r.slice(s+p+1);if(2===p)return r.slice(s+p)}a>d&&(e.charCodeAt(i+p)===u?h=p:2===p&&(h=3)),-1===h&&(h=0)}var m="";for(p=i+h+1;p<=o;++p)p!==o&&e.charCodeAt(p)!==u||(m+=0===m.length?"..":"\\..");return s+=h,m.length>0?"".concat(m).concat(r.slice(s,l)):(r.charCodeAt(s)===u&&++s,r.slice(s,l))},toNamespacedPath:function(e){if("string"!==typeof e)return e;if(0===e.length)return"";var t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===u){if(t.charCodeAt(1)===u){var n=t.charCodeAt(2);if(63!==n&&n!==l)return"\\\\?\\UNC\\".concat(t.slice(2))}}else if(m(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===u)return"\\\\?\\".concat(t);return e},dirname:function(e){f(e,"path");var t=e.length;if(0===t)return".";var n=-1,r=0,i=e.charCodeAt(0);if(1===t)return p(i)?e:".";if(p(i)){if(n=r=1,p(e.charCodeAt(1))){for(var o=2,a=o;o2&&p(e.charCodeAt(2))?3:2);for(var s=-1,l=!0,c=t-1;c>=r;--c)if(p(e.charCodeAt(c))){if(!l){s=c;break}}else l=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename:function(e,t){void 0!==t&&f(t,"ext"),f(e,"path");var n,r=0,i=-1,o=!0;if(e.length>=2&&m(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=r;--n){var l=e.charCodeAt(n);if(p(l)){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(p(e.charCodeAt(n))){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){f(e,"path");var t=0,n=-1,r=0,i=-1,o=!0,a=0;e.length>=2&&e.charCodeAt(1)===d&&m(e.charCodeAt(0))&&(t=r=2);for(var s=e.length-1;s>=t;--s){var c=e.charCodeAt(s);if(p(c)){if(!o){r=s+1;break}}else-1===i&&(o=!1,i=s+1),c===l?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1)}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:_.bind(null,"\\"),parse:function(e){f(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n=e.length,r=0,i=e.charCodeAt(0);if(1===n)return p(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(p(i)){if(r=1,p(e.charCodeAt(1))){for(var o=2,a=o;o0&&(t.root=e.slice(0,r));for(var s=-1,c=r,u=-1,h=!0,g=e.length-1,v=0;g>=r;--g)if(p(i=e.charCodeAt(g))){if(!h){c=g+1;break}}else-1===u&&(h=!1,u=g+1),i===l?-1===s?s=g:1!==v&&(v=1):-1!==s&&(v=-1);return-1!==u&&(-1===s||0===v||1===v&&s===u-1&&s===c+1?t.base=t.name=e.slice(c,u):(t.name=e.slice(c,s),t.base=e.slice(c,u),t.ext=e.slice(s,u))),t.dir=c>0&&c!==r?e.slice(0,c-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:s.a();f(r,"path"),0!==r.length&&(e="".concat(r,"/").concat(e),t=r.charCodeAt(0)===c)}return e=v(e,!t,"/",g),t?"/".concat(e):e.length>0?e:"."},normalize:function(e){if(f(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===c,n=e.charCodeAt(e.length-1)===c;return 0===(e=v(e,!t,"/",g)).length?t?"/":n?"./":".":(n&&(e+="/"),t?"/".concat(e):e)},isAbsolute:function(e){return f(e,"path"),e.length>0&&e.charCodeAt(0)===c},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/".concat(n))}return void 0===e?".":y.normalize(e)},relative:function(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";for(var n=e.length,r=n-1,i=t.length-1,o=ro){if(t.charCodeAt(1+s)===c)return t.slice(1+s+1);if(0===s)return t.slice(1+s)}else r>o&&(e.charCodeAt(1+s)===c?a=s:0===s&&(a=0));var u="";for(s=1+a+1;s<=n;++s)s!==n&&e.charCodeAt(s)!==c||(u+=0===u.length?"..":"/..");return"".concat(u).concat(t.slice(1+a))},toNamespacedPath:function(e){return e},dirname:function(e){if(f(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===c,n=-1,r=!0,i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===c){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&f(t,"ext"),f(e,"path");var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(l===c){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===c){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){f(e,"path");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(s!==c)-1===r&&(i=!1,r=a+1),s===l?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:_.bind(null,"/"),parse:function(e){f(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0)===c;r?(t.root="/",n=1):n=0;for(var i=-1,o=0,a=-1,s=!0,u=e.length-1,d=0;u>=n;--u){var h=e.charCodeAt(u);if(h!==c)-1===a&&(s=!1,a=u+1),h===l?-1===i?i=u:1!==d&&(d=1):-1!==i&&(d=-1);else if(!s){o=u+1;break}}if(-1!==a){var p=0===o&&r?1:o;-1===i||0===d||1===d&&i===a-1&&i===o+1?t.base=t.name=e.slice(p,a):(t.name=e.slice(p,i),t.base=e.slice(p,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=b.win32=b,y.posix=b.posix=y;var S="win32"===s.c?b.normalize:y.normalize,C="win32"===s.c?b.resolve:y.resolve,k="win32"===s.c?b.relative:y.relative,E="win32"===s.c?b.dirname:y.dirname,w="win32"===s.c?b.basename:y.basename,O="win32"===s.c?b.extname:y.extname,T="win32"===s.c?b.sep:y.sep},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(33),a=n(215),s=new(function(){function e(){Object(r.a)(this,e),this.data=new Map}return Object(i.a)(e,[{key:"add",value:function(e,t){a.a(o.j(e)),a.a(o.i(t)),a.a(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}},{key:"as",value:function(e){return this.data.get(e)||null}}]),e}())},function(e,t,n){"use strict";n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"k",(function(){return _})),n.d(t,"b",(function(){return y})),n.d(t,"n",(function(){return S})),n.d(t,"e",(function(){return C})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return E})),n.d(t,"m",(function(){return w})),n.d(t,"l",(function(){return O})),n.d(t,"o",(function(){return x})),n.d(t,"p",(function(){return N})),n.d(t,"s",(function(){return L})),n.d(t,"q",(function(){return A})),n.d(t,"t",(function(){return I})),n.d(t,"r",(function(){return R}));var r=n(2),i=n(23),o=n(11),a=n(30),s=Object(o.gc)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},r.a("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(o.gc)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},r.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=Object(o.gc)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},r.a("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),u=Object(o.gc)("editor.rangeHighlightBorder",{dark:null,light:null,hc:o.b},r.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),d=Object(o.gc)("editor.symbolHighlightBackground",{dark:o.x,light:o.x,hc:null},r.a("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),h=Object(o.gc)("editor.symbolHighlightBorder",{dark:null,light:null,hc:o.b},r.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),f=Object(o.gc)("editorCursor.foreground",{dark:"#AEAFAD",light:i.a.black,hc:i.a.white},r.a("caret","Color of the editor cursor.")),p=Object(o.gc)("editorCursor.background",null,r.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),g=Object(o.gc)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},r.a("editorWhitespaces","Color of whitespace characters in the editor.")),m=Object(o.gc)("editorIndentGuide.background",{dark:g,light:g,hc:g},r.a("editorIndentGuides","Color of the editor indentation guides.")),v=Object(o.gc)("editorIndentGuide.activeBackground",{dark:g,light:g,hc:g},r.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),_=Object(o.gc)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:i.a.white},r.a("editorLineNumbers","Color of editor line numbers.")),b=Object(o.gc)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o.b},r.a("editorActiveLineNumber","Color of editor active line number"),!1,r.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=Object(o.gc)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},r.a("editorActiveLineNumber","Color of editor active line number")),S=Object(o.gc)("editorRuler.foreground",{dark:"#5A5A5A",light:i.a.lightgrey,hc:i.a.white},r.a("editorRuler","Color of the editor rulers.")),C=Object(o.gc)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},r.a("editorCodeLensForeground","Foreground color of editor CodeLens")),k=Object(o.gc)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},r.a("editorBracketMatchBackground","Background color behind matching brackets")),E=Object(o.gc)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o.h},r.a("editorBracketMatchBorder","Color for matching brackets boxes")),w=Object(o.gc)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},r.a("editorOverviewRulerBorder","Color of the overview ruler border.")),O=Object(o.gc)("editorOverviewRuler.background",null,r.a("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),T=Object(o.gc)("editorGutter.background",{dark:o.s,light:o.s,hc:o.s},r.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),x=Object(o.gc)("editorUnnecessaryCode.border",{dark:null,light:null,hc:i.a.fromHex("#fff").transparent(.8)},r.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),N=Object(o.gc)("editorUnnecessaryCode.opacity",{dark:i.a.fromHex("#000a"),light:i.a.fromHex("#0007"),hc:null},r.a("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.")),D=new i.a(new i.c(0,122,204,.6)),L=Object(o.gc)("editorOverviewRuler.rangeHighlightForeground",{dark:D,light:D,hc:D},r.a("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A=Object(o.gc)("editorOverviewRuler.errorForeground",{dark:new i.a(new i.c(255,18,18,.7)),light:new i.a(new i.c(255,18,18,.7)),hc:new i.a(new i.c(255,50,50,1))},r.a("overviewRuleError","Overview ruler marker color for errors.")),I=Object(o.gc)("editorOverviewRuler.warningForeground",{dark:o.T,light:o.T,hc:o.S},r.a("overviewRuleWarning","Overview ruler marker color for warnings.")),R=Object(o.gc)("editorOverviewRuler.infoForeground",{dark:o.L,light:o.L,hc:o.K},r.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(a.g)((function(e,t){var n=e.getColor(o.s);n&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ".concat(n,"; }"));var r=e.getColor(o.B);r&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: ".concat(r,"; }"));var i=e.getColor(T);i&&t.addRule(".monaco-editor .margin { background-color: ".concat(i,"; }"));var a=e.getColor(c);a&&t.addRule(".monaco-editor .rangeHighlight { background-color: ".concat(a,"; }"));var s=e.getColor(u);s&&t.addRule(".monaco-editor .rangeHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(s,"; }"));var l=e.getColor(d);l&&t.addRule(".monaco-editor .symbolHighlight { background-color: ".concat(l,"; }"));var f=e.getColor(h);f&&t.addRule(".monaco-editor .symbolHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(f,"; }"));var p=e.getColor(g);p&&(t.addRule(".monaco-editor .mtkw { color: ".concat(p," !important; }")),t.addRule(".monaco-editor .mtkz { color: ".concat(p," !important; }")))}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"a",(function(){return u}));var r,i,o=n(0),a=n(1);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(r||(r={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(i||(i={}));var s=function(){function e(t){Object(o.a)(this,e),this.tabSize=Math.max(1,0|t.tabSize),this.indentSize=0|t.tabSize,this.insertSpaces=Boolean(t.insertSpaces),this.defaultEOL=0|t.defaultEOL,this.trimAutoWhitespace=Boolean(t.trimAutoWhitespace)}return Object(a.a)(e,[{key:"equals",value:function(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}},{key:"createChangeEvent",value:function(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}]),e}(),l=function e(t,n){Object(o.a)(this,e),this.range=t,this.matches=n},c=function e(t,n,r,i,a,s){Object(o.a)(this,e),this.identifier=t,this.range=n,this.text=r,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=a,this._isTracked=s},u=function e(t,n,r){Object(o.a)(this,e),this.reverseEdits=t,this.changes=n,this.trimAutoWhitespaceLineNumbers=r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return E})),n.d(t,"f",(function(){return k})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return O})),n.d(t,"j",(function(){return y}));var r=n(31),i=Math.pow(2,16);function o(e){return 65535&e}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},s=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};s.prototype.recover=function(e){var t=0,n=o(e);if(!this.inverted)for(var r=0;re)break;var u=this.ranges[l+o],d=this.ranges[l+s],h=c+u;if(e<=h){var f=c+r+((u?e==c?-1:e==h?1:t:t)<0?0:d);if(n)return f;var p=e==(t<0?c:h)?null:l/3+(e-c)*i;return new a(f,t<0?e!=c:e!=h,p)}r+=d-u}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=o(t),i=this.inverted?2:1,a=this.inverted?1:2,s=0;se)break;var c=this.ranges[s+i];if(e<=l+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;ni&&s0},u.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(u.prototype,d);var f=Object.create(null),p=function(){};p.prototype.apply=function(e){return h()},p.prototype.getMap=function(){return s.empty},p.prototype.invert=function(e){return h()},p.prototype.map=function(e){return h()},p.prototype.merge=function(e){return null},p.prototype.toJSON=function(){return h()},p.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=f[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},p.jsonID=function(e,t){if(e in f)throw new RangeError("Duplicate use of step JSON ID "+e);return f[e]=t,t.prototype.jsonID=e,t};var g=function(e,t){this.doc=e,this.failed=t};g.ok=function(e){return new g(e,null)},g.fail=function(e){return new g(null,e)},g.fromReplace=function(e,t,n,i){try{return g.ok(e.replace(t,n,i))}catch(o){if(o instanceof r.ReplaceError)return g.fail(o.message);throw o}};var m=function(e){function t(t,n,r,i){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&_(e,this.from,this.to)?g.fail("Structure replace would overwrite content"):g.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var i=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),i,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(p);p.jsonID("replace",m);var v=function(e){function t(t,n,r,i,o,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(_(e,this.from,this.gapFrom)||_(e,this.gapTo,this.to)))return g.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return g.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?g.fromReplace(e,this.from,this.to,n):g.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return n.deleted&&r.deleted||ir.pos?null:new t(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(p);function _(e,t,n){for(var r=e.resolve(t),i=n-t,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var a=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function y(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(no;s--,l--){var c=i.node(s),u=i.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),h=r&&r[l]||c;if(h!=c&&(d=d.replaceChild(0,h.type.create(h.attrs))),!c.canReplace(u+1,c.childCount)||!h.type.validContent(d))return!1}var f=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(f,f,p?p.type:i.node(o+1).type)}function E(e,t){var n=e.resolve(t),r=n.index();return w(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function w(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function O(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),i=r.depth;;i--){var o=void 0,a=void 0,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&w(o,a)&&r.node(i).canReplace(s,s+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}function T(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var i=n.content,o=0;o=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0);if(1==a?r.node(s).canReplace(c,c,i):r.node(s).contentMatchAt(c).findWrapping(i.firstChild.type))return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function x(e,t,n){for(var i=[],o=0;ot;h--)f||n.index(h)>0?(f=!0,u=r.Fragment.from(n.node(h).copy(u)),d++):l--;for(var p=r.Fragment.empty,g=0,m=o,_=!1;m>t;m--)_||i.after(m+1)=0;i--)n=r.Fragment.from(t[i].type.create(t[i].attrs,n));var o=e.start,a=e.end;return this.step(new v(o,a,o,a,new r.Slice(n,0,0),t.length,!0))},u.prototype.setBlockType=function(e,t,n,i){var o=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,i)&&function(e,t,n){var r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(o.doc,o.mapping.slice(a).map(t),n)){o.clearIncompatible(o.mapping.slice(a).map(t,1),n);var s=o.mapping.slice(a),l=s.map(t,1),c=s.map(t+e.nodeSize,1);return o.step(new v(l,c,l+1,c-1,new r.Slice(r.Fragment.from(n.create(i,null,e.marks)),0,0),1,!0)),!1}})),this},u.prototype.setNodeMarkup=function(e,t,n,i){var o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var a=t.create(n,null,i||o.marks);if(o.isLeaf)return this.replaceWith(e,e+o.nodeSize,a);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new v(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},u.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var i=this.doc.resolve(e),o=r.Fragment.empty,a=r.Fragment.empty,s=i.depth,l=i.depth-t,c=t-1;s>l;s--,c--){o=r.Fragment.from(i.node(s).copy(o));var u=n&&n[c];a=r.Fragment.from(u?u.type.create(u.attrs,a):i.node(s).copy(a))}return this.step(new m(e,e,new r.Slice(o.append(a),t,t),!0))},u.prototype.join=function(e,t){void 0===t&&(t=1);var n=new m(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var N=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),i=e.resolve(this.from),o=i.node(i.sharedDepth(this.to)),a=new r.Slice(x(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new D(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(p);p.jsonID("addMark",N);var D=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),i=new r.Slice(x(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,i)},t.prototype.invert=function(){return new N(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(p);function L(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}p.jsonID("removeMark",D),u.prototype.addMark=function(e,t,n){var r=this,i=[],o=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,c){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),h=Math.min(l+r.nodeSize,t),f=n.addToSet(u),p=0;p=0;f--)this.step(o[f]);return this},u.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var i=function(e,t,n,i){if(void 0===n&&(n=t),void 0===i&&(i=r.Slice.empty),t==n&&!i.size)return null;var o=e.resolve(t),a=e.resolve(n);return L(o,a,i)?new m(t,n,i):new A(o,a,i).fit()}(this.doc,e,t,n);return i&&this.step(i),this},u.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},u.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var A=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var i=0;i<=e.depth;i++){var o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},I={depth:{configurable:!0}};function R(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(R(e.firstChild.content,t-1,n)))}function M(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(M(e.lastChild.content,t-1,n)))}function P(e,t){for(var n=0;n1&&(i=i.replaceChild(0,j(i.firstChild,t-1,1==i.childCount?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(r.Fragment.empty,!0)))),e.copy(i)}function F(e,t,n,r,i){var o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;var s=r.fillBefore(o.content,!0,a);return s&&!function(e,t,n){for(var r=n;ri){var s=o.contentMatchAt(0),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).fillBefore(r.Fragment.empty,!0))}return e}function U(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var i=e.start(r);if(it.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;i==t.start(r)&&n.push(r)}return n}I.depth.get=function(){return this.frontier.length-1},A.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;for(var a=this.placed,s=i.depth,l=o.depth;s&&l&&1==a.childCount;)a=a.firstChild.content,s--,l--;var c=new r.Slice(a,s,l);return t>-1?new v(i.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||i.pos!=this.$to.pos?new m(i.pos,o.pos,c):void 0},A.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,i=(t?(n=P(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var a=this.frontier[o],s=a.type,l=a.match,c=void 0,u=void 0;if(1==e&&(i?l.matchType(i.type)||(u=l.fillBefore(r.Fragment.from(i),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:u};if(2==e&&i&&(c=l.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:c};if(n&&l.matchType(n.type))break}},A.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,i=e.openEnd,o=P(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(i,o.size+n>=t.size-i?n+1:0)),!0)},A.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,i=e.openEnd,o=P(t,n);if(o.childCount<=1&&n>0){var a=t.size-n<=n+o.size;this.unplaced=new r.Slice(R(t,n-1,1),n-1,a?n-1:i)}else this.unplaced=new r.Slice(R(t,n,1),n,i)},A.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,i=e.parent,o=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s1||0==u||_.content.size)&&(p=b,h.push(j(_.mark(g.allowedMarks(_.marks)),1==d?u:0,d==c.childCount?v:-1)))}var y=d==c.childCount;y||(v=-1),this.placed=M(this.placed,n,r.Fragment.from(h)),this.frontier[n].match=p,y&&v<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var S=0,C=c;S1&&r==this.$to.end(--n);)++r;return r},A.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,i=n.type,o=t=0;s--){var l=this.frontier[s],c=l.match,u=F(e,s,l.type,c,!0);if(!u||u.childCount)continue e}return{depth:t,fit:a,move:o?e.doc.resolve(e.after(t+1)):e}}}},A.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=M(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,i)}return e},A.prototype.openFrontierNode=function(e,t,n){var i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=M(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},A.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=M(this.placed,this.frontier.length,e))},Object.defineProperties(A.prototype,I),u.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var i=this.doc.resolve(e),o=this.doc.resolve(t);if(L(i,o,n))return this.step(new m(e,t,n));var a=U(i,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(i.depth+1);a.unshift(s);for(var l=i.depth,c=i.pos-1;l>0;l--,c--){var u=i.node(l).type.spec;if(u.defining||u.isolating)break;a.indexOf(l)>-1?s=l:i.before(l)==c&&a.splice(1,0,-l)}for(var d=a.indexOf(s),h=[],f=n.openStart,p=n.content,g=0;;g++){var v=p.firstChild;if(h.push(v),g==n.openStart)break;p=v.content}f>0&&h[f-1].type.spec.defining&&i.node(d).type!=h[f-1].type?f-=1:f>=2&&h[f-1].isTextblock&&h[f-2].type.spec.defining&&i.node(d).type!=h[f-2].type&&(f-=2);for(var _=n.openStart;_>=0;_--){var b=(_+f+1)%(n.openStart+1),y=h[b];if(y)for(var S=0;S=0&&(this.replace(e,t,n),!(this.steps.length>O));T--){var x=a[T];T<0||(e=i.before(x),t=o.after(x))}return this},u.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var i=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return g}));var r=n(14),i=n.n(r),o=n(0),a=n(1),s=n(4),l=n(5),c=n(7),u=n(12),d=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},h=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4?arguments[4]:void 0;return Object(o.a)(this,n),(r=t.call(this))._onDidChange=r._register(new u.a),r.onDidChange=r._onDidChange.event,r._enabled=!0,r._checked=!1,r._id=e,r._label=i,r._cssClass=a,r._enabled=s,r._actionCallback=l,r}return Object(a.a)(n,[{key:"_setLabel",value:function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}},{key:"_setTooltip",value:function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}},{key:"_setClass",value:function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}},{key:"_setEnabled",value:function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}},{key:"_setChecked",value:function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}},{key:"run",value:function(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}},{key:"id",get:function(){return this._id}},{key:"label",get:function(){return this._label},set:function(e){this._setLabel(e)}},{key:"tooltip",get:function(){return this._tooltip||""},set:function(e){this._setTooltip(e)}},{key:"class",get:function(){return this._cssClass},set:function(e){this._setClass(e)}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._setEnabled(e)}},{key:"checked",get:function(){return this._checked},set:function(e){this._setChecked(e)}}]),n}(c.a),f=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments))._onDidBeforeRun=e._register(new u.a),e.onDidBeforeRun=e._onDidBeforeRun.event,e._onDidRun=e._register(new u.a),e.onDidRun=e._onDidRun.event,e}return Object(a.a)(n,[{key:"run",value:function(e,t){return d(this,void 0,void 0,i.a.mark((function n(){var r;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.enabled){n.next=2;break}return n.abrupt("return",Promise.resolve(null));case 2:return this._onDidBeforeRun.fire({action:e}),n.prev=3,n.next=6,this.runAction(e,t);case 6:r=n.sent,this._onDidRun.fire({action:e,result:r}),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(3),this._onDidRun.fire({action:e,error:n.t0});case 13:case"end":return n.stop()}}),n,this,[[3,10]])})))}},{key:"runAction",value:function(e,t){var n=t?e.run(t):e.run();return Promise.resolve(n)}}]),n}(c.a),p=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,n.ID,e,e?"separator text":"separator")).checked=!1,r.enabled=!1,r}return n}(h);p.ID="vs.actions.separator";var g=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,i,a){var s;return Object(o.a)(this,n),(s=t.call(this,e,r,a,!0))._actions=i,s}return Object(a.a)(n,[{key:"actions",get:function(){return Array.isArray(this._actions)?this._actions:this._actions()}}]),n}(h)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return g}));var r,i=n(0),o=n(1),a=n(17),s=n(16),l=n(4),c=n(5),u=n(24),d=n(7),h=n(3),f=n(104),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(r||(r={}));var g=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.call(this)).dispatched=!1,e.activeTouches={},e.handle=null,e.targets=[],e.ignoreTargets=[],e._lastSetTapCountTime=0,e._register(h.addDisposableListener(document,"touchstart",(function(t){return e.onTouchStart(t)}),{passive:!1})),e._register(h.addDisposableListener(document,"touchend",(function(t){return e.onTouchEnd(t)}))),e._register(h.addDisposableListener(document,"touchmove",(function(t){return e.onTouchMove(t)}),{passive:!1})),e}return Object(o.a)(n,[{key:"dispose",value:function(){this.handle&&(this.handle.dispose(),this.handle=null),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onTouchStart",value:function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=n.HOLD_DELAY&&Math.abs(c.initialPageX-u.t(c.rollingPageX))<30&&Math.abs(c.initialPageY-u.t(c.rollingPageY))<30){var f=t.newGestureEvent(r.Contextmenu,c.initialTarget);f.pageX=u.t(c.rollingPageX),f.pageY=u.t(c.rollingPageY),t.dispatchEvent(f)}else if(1===o){var p=u.t(c.rollingPageX),g=u.t(c.rollingPageY),m=u.t(c.rollingTimestamps)-c.rollingTimestamps[0],v=p-c.rollingPageX[0],_=g-c.rollingPageY[0],b=t.targets.filter((function(e){return c.initialTarget instanceof Node&&e.contains(c.initialTarget)}));t.inertia(b,i,Math.abs(v)/m,v>0?1:-1,p,Math.abs(_)/m,_>0?1:-1,g)}t.dispatchEvent(t.newGestureEvent(r.End,c.initialTarget)),delete t.activeTouches[l.identifier]},s=0,l=e.changedTouches.length;sn.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=i,e.tapCount=o}else e.type!==r.Change&&e.type!==r.Contextmenu||(this._lastSetTapCountTime=0);for(var a=0;a0&&(g=!1,f=o*i*h),s>0&&(g=!1,p=l*s*h);var m=u.newGestureEvent(r.Change);m.translationX=f,m.translationY=p,e.forEach((function(e){return e.dispatchEvent(m)})),g||u.inertia(e,d,i,o,a+f,s,l,c+p)}))}},{key:"onTouchMove",value:function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}],[{key:"addTarget",value:function(e){return n.isTouchDevice()?(n.INSTANCE||(n.INSTANCE=new n),n.INSTANCE.targets.push(e),{dispose:function(){n.INSTANCE.targets=n.INSTANCE.targets.filter((function(t){return t!==e}))}}):d.a.None}},{key:"ignoreTarget",value:function(e){return n.isTouchDevice()?(n.INSTANCE||(n.INSTANCE=new n),n.INSTANCE.ignoreTargets.push(e),{dispose:function(){n.INSTANCE.ignoreTargets=n.INSTANCE.ignoreTargets.filter((function(t){return t!==e}))}}):d.a.None}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}}]),n}(d.a);g.SCROLL_FRICTION=-.005,g.HOLD_DELAY=700,g.CLEAR_TAP_COUNT_TIME=400,p([f.a],g,"isTouchDevice",null)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(0),i=n(1),o=n(34),a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this._range=t,this._text=n,this.insertsAutoWhitespace=i}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}]),e}(),s=function(){function e(t,n){Object(r.a)(this,e),this._range=t,this._text=n}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}]),e}(),l=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this._range=t,this._text=n,this.insertsAutoWhitespace=i}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}]),e}(),c=function(){function e(t,n,i,o){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Object(r.a)(this,e),this._range=t,this._text=n,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=a}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}]),e}(),u=function(){function e(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object(r.a)(this,e),this._range=t,this._text=n,this._initialSelection=i,this._forceMoveMarkers=o,this._selectionId=null}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}},{key:"computeCursorState",value:function(e,t){return t.getTrackedSelection(this._selectionId)}}]),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l}));var r,i,o=n(29),a=n(2),s=n(76);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(r||(r={})),function(e){e.compare=function(e,t){return t-e};var t=Object.create(null);t[e.Error]=Object(a.a)("sev.error","Error"),t[e.Warning]=Object(a.a)("sev.warning","Warning"),t[e.Info]=Object(a.a)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.a.Error:return e.Error;case s.a.Warning:return e.Warning;case s.a.Info:return e.Info;case s.a.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.a.Error;case e.Warning:return s.a.Warning;case e.Info:return s.a.Info;case e.Hint:return s.a.Ignore}}}(r||(r={})),function(e){var t="";function n(e,n){var i=[t];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(r.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("\xa6","\\\xa6")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("\xa6")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(i||(i={}));var l=Object(o.c)("markerService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(29),i=Object(r.c)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h}));n(450);var r,i,o,a,s,l=n(21),c=n(3);function u(e){(r=document.createElement("div")).className="monaco-aria-container";var t=function(){var e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};i=t(),o=t();var n=function(){var e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};a=n(),s=n(),e.appendChild(r)}function d(e){r&&(i.textContent!==e?(c.clearNode(o),f(i,e)):(c.clearNode(i),f(o,e)))}function h(e){r&&(l.f?d(e):a.textContent!==e?(c.clearNode(s),f(a,e)):(c.clearNode(a),f(s,e)))}function f(e,t){c.clearNode(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n(1),o=n(46),a=n(58),s=n(21),l=new Array(230),c=new Array(112);!function(){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(Object(r.a)(this,e),this.browserEvent=t||null,this.target=t?t.target||t.targetNode||t.srcElement:null,this.deltaY=i,this.deltaX=n,t){var a=t,l=t;if("undefined"!==typeof a.wheelDeltaY)this.deltaY=a.wheelDeltaY/120;else if("undefined"!==typeof l.VERTICAL_AXIS&&l.axis===l.VERTICAL_AXIS)this.deltaY=-l.detail/3;else if("wheel"===t.type){var c=t;c.deltaMode===c.DOM_DELTA_LINE?o.h&&!s.f?this.deltaY=-t.deltaY/3:this.deltaY=-t.deltaY:this.deltaY=-t.deltaY/40}if("undefined"!==typeof a.wheelDeltaX)o.j&&s.i?this.deltaX=-a.wheelDeltaX/120:this.deltaX=a.wheelDeltaX/120;else if("undefined"!==typeof l.HORIZONTAL_AXIS&&l.axis===l.HORIZONTAL_AXIS)this.deltaX=-t.detail/3;else if("wheel"===t.type){var u=t;u.deltaMode===u.DOM_DELTA_LINE?o.h&&!s.f?this.deltaX=-t.deltaX/3:this.deltaX=-t.deltaX:this.deltaX=-t.deltaX/40}0===this.deltaY&&0===this.deltaX&&t.wheelDelta&&(this.deltaY=t.wheelDelta/120)}}return Object(i.a)(e,[{key:"preventDefault",value:function(){this.browserEvent&&this.browserEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.browserEvent&&this.browserEvent.stopPropagation()}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(1),o=n(8),a=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"insert",value:function(e,t){return{range:new o.a(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}},{key:"delete",value:function(e){return{range:e,text:null}}},{key:"replace",value:function(e,t){return{range:e,text:t}}},{key:"replaceMove",value:function(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}]),e}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"i",(function(){return y})),n.d(t,"g",(function(){return O})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return x})),n.d(t,"a",(function(){return L})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return G}));var r=n(84),i=n(15);function o(){for(var e=arguments.length,t=new Array(e),n=0;n0?[{start:0,end:t.length}]:[]}.bind(void 0,!0);function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function l(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]===t[r]){var i;return(i=l(e,t,n+1,r+1))?m({start:r,end:r+1},i):null}return l(e,t,n,r+1)}function c(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function d(e){return 48<=e&&e<=57}function h(e){return 32===e||9===e||10===e||13===e}var f=new Set;function p(e){return h(e)||f.has(e)}function g(e){return c(e)||u(e)||d(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function v(e,t){for(var n=t;n0&&!g(e.charCodeAt(n-1)))return n}return e.length}function _(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]!==t[r].toLowerCase())return null;var i=null,o=r+1;for(i=_(e,t,n+1,r+1);!i&&(o=v(t,o))60)return null;var n=function(e){for(var t=0,n=0,r=0,i=0,o=0,a=0;a.2&&t<.8&&r>.6&&i<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var r=null,i=0;for(e=e.toLowerCase();i2&&void 0!==arguments[2]&&arguments[2];if(!t||0===t.length)return null;var r=null,i=0;for(e=e.toLowerCase(),t=t.toLowerCase();i0&&p(e.charCodeAt(n-1)))return n;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((function(e){return f.add(e.charCodeAt(0))}));var k=o(a,b,s),E=o(a,b,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),w=new r.a(1e4);function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof e||"string"!==typeof t)return null;var r=w.get(e);r||(r=new RegExp(i.p(e),"i"),w.set(e,r));var o=r.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:n?E(e,t):k(e,t)}function T(e,t,n,r,i,o){var a=j(e,t,0,r,i,0,!0);if(a)return a;for(var s=0,l=0,c=o,u=0;u=0)l+=1,s+=Math.pow(2,d),c=d+1;else if(0!==s)break}return[l,s,o]}function x(e){if("undefined"===typeof e)return[];for(var t=e[1].toString(2),n=[],r=e[2];r=e.length)return!1;switch(e.charCodeAt(t)){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 P(e,t,n){return t[e]!==n[e]}function j(e,t,n,r,i,o,a){var s=e.length>N?N:e.length,l=r.length>N?N:r.length;if(!(n>=s||o>=l||s-n>l-o)&&function(e,t,n,r,i,o){for(;t1&&(f=!0),I[c][u]=p;var g=A[c-1][u-1]+(p>1?1:p),m=A[c-1][u]+-1,v=A[c][u-1]+-1;v>=m?v>g?(A[c][u]=v,R[c][u]=4):v===g?(A[c][u]=v,R[c][u]=6):(A[c][u]=g,R[c][u]=2):m>g?(A[c][u]=m,R[c][u]=1):m===g?(A[c][u]=m,R[c][u]=3):(A[c][u]=g,R[c][u]=2)}if((f||a)&&(B=0,H=-100,z=o,V=a,W(c-1,u-1,s===l?1:0,0,!1),0!==B))return[H,U,o]}}function F(e,t,n,r,i,o,a){return t[n]!==o[a]?-1:a===n-r?e[n]===i[a]?7:5:!P(a,i,o)||0!==a&&P(a-1,i,o)?!M(o,a)||0!==a&&M(o,a-1)?M(o,a-1)||function(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}(o,a-1)?5:1:5:e[n]===i[a]?7:5}!function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(L||(L={}));var B=0,U=0,H=0,z=0,V=!1;function W(e,t,n,r,i){if(!(B>=10||n<-25)){for(var o=0;e>0&&t>0;){var a=I[e][t],s=R[e][t];if(4===s)t-=1,i?n-=5:0!==r&&(n-=1),i=!1,o=0;else{if(!(2&s))return;if(4&s&&W(e,t-1,0!==r?n-1:n,r,i),n+=a,e-=1,t-=1,i=!0,r+=Math.pow(2,t+z),1===a){if(o+=1,0===e&&!V)return}else n+=1+o*(a-1),o=0}}B+=1,(n-=t>=3?9:3*t)>H&&(H=n,U=r)}}function G(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a,s){var l=j(e,t,n,r,i,o,s);if(l&&!a)return l;if(e.length>=3)for(var c=Math.min(7,e.length-1),u=n+1;ul[0])&&(l=h))}}return l}(e,t,n,r,i,o,!0,a)}function q(e,t){if(!(t+1>=e.length)){var n=e[t],r=e[t+1];if(n!==r)return e.slice(0,t)+r+n+e.slice(t+2)}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g}));var r,i=n(0),o=n(1),a=n(15),s="undefined"!==typeof e,l="undefined"!==typeof TextDecoder,c=function(){function e(t){Object(i.a)(this,e),this.buffer=t,this.byteLength=this.buffer.byteLength}return Object(o.a)(e,[{key:"toString",value:function(){return s?this.buffer.toString():l?(r||(r=new TextDecoder),r.decode(this.buffer)):a.r(this.buffer)}}]),e}();function u(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function d(e,t,n){e[n+0]=255&t,t>>>=8,e[n+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 f(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function p(e,t){return e[t]}function g(e,t,n){e[n]=t}}).call(this,n(446).Buffer)},function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return d}));var r=n(1),i=n(0),o=n(15),a=function e(t,n,r,o){Object(i.a)(this,e),this.top=0|t,this.left=0|n,this.width=0|r,this.height=0|o},s=function e(t,n){Object(i.a)(this,e),this.tabSize=t,this.data=n},l=function e(t,n,r,o,a,s){Object(i.a)(this,e),this.content=t,this.continuesWithWrappedLine=n,this.minColumn=r,this.maxColumn=o,this.startVisibleColumn=a,this.tokens=s},c=function(){function e(t,n,r,o,a,s,l,c,u,d){Object(i.a)(this,e),this.minColumn=t,this.maxColumn=n,this.content=r,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(r,s),this.containsRTL=e.containsRTL(r,this.isBasicASCII,a),this.tokens=l,this.inlineDecorations=c,this.tabSize=u,this.startVisibleColumn=d}return Object(r.a)(e,null,[{key:"isBasicASCII",value:function(e,t){return!t||o.B(e)}},{key:"containsRTL",value:function(e,t,n){return!(t||!n)&&o.m(e)}}]),e}(),u=function e(t,n,r){Object(i.a)(this,e),this.range=t,this.inlineClassName=n,this.type=r},d=function e(t,n){Object(i.a)(this,e),this.range=t,this.options=n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r,i=n(0),o=n(1);!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(r||(r={}));var a=function(){function e(t){if(Object(i.a)(this,e),this.open=t.open,this.close=t.close,this._standardTokenMask=0,Array.isArray(t.notIn))for(var n=0,r=t.notIn.length;n=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(336);var d=/[&<>"]/,h=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function p(e){return f[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var m=n(284);t.lib={},t.lib.mdurl=n(337),t.lib.ucmicro=n(681),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(h,p):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(e=e.replace(/\u1e9e/g,"\xdf")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return E}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(38),l=n(14),c=n.n(l),u=n(22),d=n(6),h=n(0),f=n(1),p=n(39),g=n(15),m=n(53),v=n(21),_=function(){function e(){Object(h.a)(this,e),this._value="",this._pos=0}return Object(f.a)(e,[{key:"reset",value:function(e){return this._value=e,this._pos=0,this}},{key:"next",value:function(){return this._pos+=1,this}},{key:"hasNext",value:function(){return this._pos0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Object(h.a)(this,e),this._splitOnBackslash=t,this._caseSensitive=n}return Object(f.a)(e,[{key:"reset",value:function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}},{key:"hasNext",value:function(){return this._to0)n.left||(n.left=new S,n.left.segment=r.value()),n=n.left;else if(i<0)n.right||(n.right=new S,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new S,n.mid.segment=r.value()),n=n.mid}}var o=n.value;return n.value=t,n.key=e,o}},{key:"get",value:function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0}},{key:"findSubstr",value:function(e){for(var t=this._iter.reset(e),n=this._root,r=void 0;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),r=n.value||r,n=n.mid}}return n&&n.value||r}},{key:"forEach",value:function(e){this._forEach(this._root,e)}},{key:"_forEach",value:function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))}}],[{key:"forUris",value:function(){return new e(new y)}},{key:"forStrings",value:function(){return new e(new _)}}]),e}(),k=function(){function e(t,n){Object(h.a)(this,e),this[Symbol.toStringTag]="ResourceMap",t instanceof e?(this.map=new Map(t.map),this.toKey=null!==n&&void 0!==n?n:e.defaultToKey):(this.map=new Map,this.toKey=null!==t&&void 0!==t?t:e.defaultToKey)}return Object(f.a)(e,[{key:"set",value:function(e,t){return this.map.set(this.toKey(e),t),this}},{key:"get",value:function(e){return this.map.get(this.toKey(e))}},{key:"has",value:function(e){return this.map.has(this.toKey(e))}},{key:"clear",value:function(){this.map.clear()}},{key:"delete",value:function(e){return this.map.delete(this.toKey(e))}},{key:"forEach",value:function(e,t){"undefined"!==typeof t&&(e=e.bind(t));var n,r=Object(d.a)(this.map);try{for(r.s();!(n=r.n()).done;){var i=Object(u.a)(n.value,2),o=i[0];e(i[1],p.a.parse(o),this)}}catch(a){r.e(a)}finally{r.f()}}},{key:"values",value:function(){return this.map.values()}},{key:"keys",value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map.keys()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,p.a.parse(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map.entries()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,[p.a.parse(r[0]),r[1]];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:Symbol.iterator,value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,[p.a.parse(r[0]),r[1]];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"size",get:function(){return this.map.size}}]),e}();k.defaultToKey=function(e){return e.toString()};var E=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Object(h.a)(this,n),(r=t.call(this))._limit=e,r._ratio=Math.min(Math.max(0,i),1),r}return Object(f.a)(n,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Object(r.a)(Object(i.a)(n.prototype),"get",this).call(this,e,t)}},{key:"peek",value:function(e){return Object(r.a)(Object(i.a)(n.prototype),"get",this).call(this,e,0)}},{key:"set",value:function(e,t){return Object(r.a)(Object(i.a)(n.prototype),"set",this).call(this,e,t,2),this.checkTrim(),this}},{key:"checkTrim",value:function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},{key:"limit",get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()}}]),n}(function(){function e(){Object(h.a)(this,e),this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}return Object(f.a)(e,[{key:"clear",value:function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}},{key:"isEmpty",value:function(){return!this._head&&!this._tail}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this._map.get(e);if(r)r.value=t,0!==n&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}},{key:"delete",value:function(e){return!!this.remove(e)}},{key:"remove",value:function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}},{key:"shift",value:function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}}},{key:"forEach",value:function(e,t){for(var n=this._state,r=this._head;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}},{key:"keys",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:r.key,done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:"values",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:r.value,done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:"entries",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:[r.key,r.value],done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:Symbol.iterator,value:function(){return this.entries()}},{key:"trimOld",value:function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}else this.clear()}},{key:"addItemFirst",value:function(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++}},{key:"addItemLast",value:function(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++}},{key:"removeItem",value:function(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{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}},{key:"touch",value:function(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;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),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;var i=e.next,o=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}},{key:"toJSON",value:function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),e}},{key:"fromJSON",value:function(e){this.clear();var t,n=Object(d.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(u.a)(t.value,2),i=r[0],o=r[1];this.set(i,o)}}catch(a){n.e(a)}finally{n.f()}}},{key:"size",get:function(){return this._size}},{key:"first",get:function(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}},{key:"last",get:function(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}}]),e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(14),i=n.n(r),o=n(39),a=n(29),s=n(7),l=n(15),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},u=Object(a.c)("openerService"),d=Object.freeze({_serviceBrand:void 0,registerOpener:function(){return s.a.None},registerValidator:function(){return s.a.None},registerExternalUriResolver:function(){return s.a.None},setExternalOpener:function(){},open:function(){return c(this,void 0,void 0,i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))},resolveExternalUri:function(e){return c(this,void 0,void 0,i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{resolved:e,dispose:function(){}});case 1:case"end":return t.stop()}}),t)})))}});function h(e,t){return o.a.isUri(e)?Object(l.t)(e.scheme,t):Object(l.T)(e,t+":")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(29),i=n(18),o=Object(r.c)("accessibilityService"),a=new i.c("accessibilityModeEnabled",!1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(0),o=n(35),a=n(19),s=n(8),l=n(15),c=function e(t,n,r){Object(i.a)(this,e),this.lineNumber=t,this.column=n,this.leftoverVisibleColumns=r},u=function(){function e(){Object(i.a)(this,e)}return Object(r.a)(e,null,[{key:"leftPosition",value:function(e,t,n){return n>e.getLineMinColumn(t)?n-=l.N(e.getLineContent(t),n-1):t>1&&(t-=1,n=e.getLineMaxColumn(t)),new a.a(t,n)}},{key:"left",value:function(t,n,r,i){var o=e.leftPosition(n,r,i);return new c(o.lineNumber,o.column,0)}},{key:"moveLeft",value:function(t,n,r,i,o){var a,s;if(r.hasSelection()&&!i)a=r.selection.startLineNumber,s=r.selection.startColumn;else{var l=e.left(t,n,r.position.lineNumber,r.position.column-(o-1));a=l.lineNumber,s=l.column}return r.move(i,a,s,0)}},{key:"rightPosition",value:function(e,t,n){return nu?(n=u,r=s?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=o.a.columnFromVisibleColumn2(e,t,n,l),i=d?0:l-o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new c(n,r,i)}},{key:"moveDown",value:function(t,n,r,i,o){var a,s;r.hasSelection()&&!i?(a=r.selection.endLineNumber,s=r.selection.endColumn):(a=r.position.lineNumber,s=r.position.column);var l=e.down(t,n,a,s,r.leftoverVisibleColumns,o,!0);return r.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)}},{key:"translateDown",value:function(t,n,r){var i=r.selection,l=e.down(t,n,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),c=e.down(t,n,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new o.f(new s.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new a.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}},{key:"up",value:function(e,t,n,r,i,a,s){var l=o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize)+i,u=1===n&&1===r;return(n-=a)<1?(n=1,r=s?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=o.a.columnFromVisibleColumn2(e,t,n,l),i=u?0:l-o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new c(n,r,i)}},{key:"moveUp",value:function(t,n,r,i,o){var a,s;r.hasSelection()&&!i?(a=r.selection.startLineNumber,s=r.selection.startColumn):(a=r.position.lineNumber,s=r.position.column);var l=e.up(t,n,a,s,r.leftoverVisibleColumns,o,!0);return r.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)}},{key:"translateUp",value:function(t,n,r){var i=r.selection,l=e.up(t,n,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),c=e.up(t,n,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new o.f(new s.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new a.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}},{key:"moveToBeginningOfLine",value:function(e,t,n,r){var i,o=n.position.lineNumber,a=t.getLineMinColumn(o),s=t.getLineFirstNonWhitespaceColumn(o)||a;return i=n.position.column===s?a:s,n.move(r,o,i,0)}},{key:"moveToEndOfLine",value:function(e,t,n,r,i){var o=n.position.lineNumber,a=t.getLineMaxColumn(o);return n.move(r,o,a,i?1073741824-a:0)}},{key:"moveToBeginningOfBuffer",value:function(e,t,n,r){return n.move(r,1,1,0)}},{key:"moveToEndOfBuffer",value:function(e,t,n,r){var i=t.getLineCount(),o=t.getLineMaxColumn(i);return n.move(r,i,o,0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n(1),o=n(4),a=n(5),s=n(3),l=n(75),c=n(77),u=n(7),d=n(70),h=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"onclick",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.CLICK,(function(e){return t(new c.a(e))})))}},{key:"onmousedown",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.MOUSE_DOWN,(function(e){return t(new c.a(e))})))}},{key:"onmouseover",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.MOUSE_OVER,(function(e){return t(new c.a(e))})))}},{key:"onnonbubblingmouseout",value:function(e,t){this._register(s.addDisposableNonBubblingMouseOutListener(e,(function(e){return t(new c.a(e))})))}},{key:"onkeydown",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_DOWN,(function(e){return t(new l.a(e))})))}},{key:"onkeyup",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_UP,(function(e){return t(new l.a(e))})))}},{key:"oninput",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.INPUT,t))}},{key:"onblur",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.BLUR,t))}},{key:"onfocus",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.FOCUS,t))}},{key:"ignoreGesture",value:function(e){d.b.ignoreTarget(e)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(29),a=function(){function e(t){Object(r.a)(this,e),this.callback=t}return Object(i.a)(e,[{key:"report",value:function(e){this._value=e,this.callback(this._value)}}]),e}();a.None=Object.freeze({report:function(){}});var s=Object(o.c)("editorProgressService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(29),i=Object(r.c)("contextViewService"),o=Object(r.c)("contextMenuService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return r}));var r,i=n(0),o=n(1),a=n(33),s=n(35),l=n(87),c=n(142),u=n(19),d=n(8),h=function(){function e(){Object(i.a)(this,e)}return Object(o.a)(e,null,[{key:"addCursorDown",value:function(e,t,n){for(var r=[],i=0,o=0,a=t.length;ol&&(c=l,h=e.model.getLineMaxColumn(c)),s.d.fromModelState(new s.f(new d.a(o.lineNumber,1,c,h),0,new u.a(c,h),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumberf){var p=e.getLineCount(),g=a.lineNumber+1,m=1;return g>p&&(g=p,m=e.getLineMaxColumn(g)),s.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),g,m,0))}var v=t.modelState.selectionStart.getEndPosition();return s.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),v.lineNumber,v.column,0))}},{key:"word",value:function(e,t,n,r){var i=e.model.validatePosition(r);return s.d.fromModelState(c.a.word(e.cursorConfig,e.model,t.modelState,n,i))}},{key:"cancelSelection",value:function(e,t){if(!t.modelState.hasSelection())return new s.d(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,r=t.viewState.position.column;return s.d.fromViewState(new s.f(new d.a(n,r,n,r),0,new u.a(n,r),0))}},{key:"moveTo",value:function(e,t,n,r,i){var o=e.model.validatePosition(r),a=i?e.coordinatesConverter.validateViewPosition(new u.a(i.lineNumber,i.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return s.d.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}},{key:"simpleMove",value:function(e,t,n,r,i,o){switch(n){case 0:return 4===o?this._moveHalfLineLeft(e,t,r):this._moveLeft(e,t,r,i);case 1:return 4===o?this._moveHalfLineRight(e,t,r):this._moveRight(e,t,r,i);case 2:return 2===o?this._moveUpByViewLines(e,t,r,i):this._moveUpByModelLines(e,t,r,i);case 3:return 2===o?this._moveDownByViewLines(e,t,r,i):this._moveDownByModelLines(e,t,r,i);case 4:return this._moveToViewMinColumn(e,t,r);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,r);case 6:return this._moveToViewCenterColumn(e,t,r);case 7:return this._moveToViewMaxColumn(e,t,r);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,r);default:return null}}},{key:"viewportMove",value:function(e,t,n,r,i){var o=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(n){case 9:var s=this._firstLineNumberInRange(e.model,a,i),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],r,s,l)];case 11:var c=this._lastLineNumberInRange(e.model,a,i),u=e.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(e,t[0],r,c,u)];case 10:var d=Math.round((a.startLineNumber+a.endLineNumber)/2),h=e.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(e,t[0],r,d,h)];case 12:for(var f=[],p=0,g=t.length;pn.endLineNumber-1&&(i=n.endLineNumber-1),i1,o=[],a=0,c=t.length;a1,o=[],a=0,c=t.length;a.001){w=!1;break}}var D=!0;w&&S.width!==O&&(D=!1),S.width>y.width&&(D=!1);var L=c.b()>2e3;return new b.b({zoomLevel:c.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:w,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:i.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:o.width,middotWidth:C.width,wsmiddotWidth:k.width,maxDigitWidth:E},L)}}]),n}(d.a);C.INSTANCE=new C;var k=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3?arguments[3]:void 0;return Object(s.a)(this,n),(i=t.call(this,e,r)).accessibilityService=a,i._elementSizeObserver=i._register(new m.a(o,r.dimension,(function(){return i._onReferenceDomElementSizeChanged()}))),i._register(C.INSTANCE.onDidChange((function(){return i._onCSSBasedConfigurationChanged()}))),i._validatedOptions.get(9)&&i._elementSizeObserver.startObserving(),i._register(c.n((function(e){return i._recomputeOptions()}))),i._register(i.accessibilityService.onDidChangeScreenReaderOptimized((function(){return i._recomputeOptions()}))),i._recomputeOptions(),i}return Object(l.a)(n,[{key:"_onReferenceDomElementSizeChanged",value:function(){this._recomputeOptions()}},{key:"_onCSSBasedConfigurationChanged",value:function(){this._recomputeOptions()}},{key:"observeReferenceElement",value:function(e){this._elementSizeObserver.observe(e)}},{key:"dispose",value:function(){Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"_getExtraEditorClassName",value:function(){var e="";return c.j||c.m||(e+="no-user-select "),h.f&&(e+="mac "),e}},{key:"_getEnvConfiguration",value:function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:c.l||c.h,pixelRatio:c.a(),zoomLevel:c.d(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}},{key:"readConfiguration",value:function(e){return C.INSTANCE.readConfiguration(e)}}],[{key:"applyFontInfoSlow",value:function(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"}},{key:"applyFontInfo",value:function(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)}}]),n}(v.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return E})),n.d(t,"c",(function(){return w}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(0),l=n(1),c=n(15),u=n(8),d=n(41),h=n(7),f=n(36),p=n(9),g=n(18),m=n(99),v=n(29),_=n(121),b=Object(v.c)("IEditorCancelService"),y=new g.c("cancellableOperation",!1);Object(_.b)(b,function(){function e(){Object(s.a)(this,e),this._tokens=new WeakMap}return Object(l.a)(e,[{key:"add",value:function(e,t){var n,r=this._tokens.get(e);return r||(r=e.invokeWithinContext((function(e){return{key:y.bindTo(e.get(g.b)),tokens:new m.a}})),this._tokens.set(e,r)),r.key.set(!0),n=r.tokens.push(t),function(){n&&(n(),r.key.set(!r.tokens.isEmpty()),n=void 0)}}},{key:"cancel",value:function(e){var t=this._tokens.get(e);if(t){var n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}}}]),e}(),!0);var S=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this,r)).editor=e,i._unregister=e.invokeWithinContext((function(t){return t.get(b).add(e,Object(f.a)(i))})),i}return Object(l.a)(n,[{key:"dispose",value:function(){this._unregister(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(d.b);Object(p.l)(new(function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(s.a)(this,n),t.call(this,{id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:y})}return Object(l.a)(n,[{key:"runEditorCommand",value:function(e,t){e.get(b).cancel(t)}}]),n}(p.c)));var C=function(){function e(t,n){if(Object(s.a)(this,e),this.flags=n,0!==(1&this.flags)){var r=t.getModel();this.modelVersionId=r?c.x("{0}#{1}",r.uri.toString(),r.getVersionId()):null}else this.modelVersionId=null;0!==(4&this.flags)?this.position=t.getPosition():this.position=null,0!==(2&this.flags)?this.selection=t.getSelection():this.selection=null,0!==(8&this.flags)?(this.scrollLeft=t.getScrollLeft(),this.scrollTop=t.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}return Object(l.a)(e,[{key:"_equals",value:function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))}},{key:"validate",value:function(t){return this._equals(new e(t,this.flags))}}]),e}(),k=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i,o){var a;return Object(s.a)(this,n),(a=t.call(this,e,o)).editor=e,a._listener=new h.b,4&r&&a._listener.add(e.onDidChangeCursorPosition((function(e){i&&u.a.containsPosition(i,e.position)||a.cancel()}))),2&r&&a._listener.add(e.onDidChangeCursorSelection((function(e){i&&u.a.containsRange(i,e.selection)||a.cancel()}))),8&r&&a._listener.add(e.onDidScrollChange((function(e){return a.cancel()}))),1&r&&(a._listener.add(e.onDidChangeModel((function(e){return a.cancel()}))),a._listener.add(e.onDidChangeModelContent((function(e){return a.cancel()})))),a}return Object(l.a)(n,[{key:"dispose",value:function(){this._listener.dispose(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(S),E=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this,r))._listener=e.onDidChangeContent((function(){return i.cancel()})),i}return Object(l.a)(n,[{key:"dispose",value:function(){this._listener.dispose(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(d.b),w=function(){function e(t,n,r){Object(s.a)(this,e),this._visiblePosition=t,this._visiblePositionScrollDelta=n,this._cursorPosition=r}return Object(l.a)(e,[{key:"restore",value:function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}},{key:"restoreRelativeVerticalPositionOfCursor",value:function(e){var t=e.getPosition();if(this._cursorPosition&&t){var n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}}],[{key:"capture",value:function(t){var n=null,r=0;if(0!==t.getScrollTop()){var i=t.getVisibleRanges();if(i.length>0){n=i[0].getStartPosition();var o=t.getTopForPosition(n.lineNumber,n.column);r=t.getScrollTop()-o}}return new e(n,r,t.getPosition())}}]),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d}));var r=n(0),i=n(1),o=n(133),a=n(20),s=new(function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,[{key:"clone",value:function(){return this}},{key:"equals",value:function(e){return this===e}}]),e}()),l="vs.editor.nullMode",c=new a.r(l,0);function u(e,t,n,r){return new o.b([new o.a(r,"",e)],n)}function d(e,t,n,r){var i=new Uint32Array(2);return i[0]=r,i[1]=(16384|e<<0|2<<23)>>>0,new o.c(i,null===n?s:n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return g}));var r=n(0),i=n(1),o=n(15),a=n(144),s=n(177),l=function(){function e(t,n,i){Object(r.a)(this,e),this.endIndex=t,this.type=n,this.metadata=i}return Object(i.a)(e,[{key:"isWhitespace",value:function(){return!!(1&this.metadata)}}]),e}(),c=function(){function e(t,n){Object(r.a)(this,e),this.startOffset=t,this.endOffset=n}return Object(i.a)(e,[{key:"equals",value:function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}]),e}(),u=function(){function e(t,n,i,o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y){Object(r.a)(this,e),this.useMonospaceOptimizations=t,this.canUseHalfwidthRightwardsArrow=n,this.lineContent=i,this.continuesWithWrappedLine=o,this.isBasicASCII=a,this.containsRTL=s,this.fauxIndentLength=l,this.lineTokens=c,this.lineDecorations=u,this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=f,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===v?4:"boundary"===v?1:"selection"===v?2:"trailing"===v?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=y&&y.sort((function(e,t){return e.startOffset>>0;this._data[e]=i,this._absoluteOffsets[e]=r+n}},{key:"getAbsoluteOffsets",value:function(){return this._absoluteOffsets}},{key:"charOffsetToPartData",value:function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}},{key:"partDataToCharOffset",value:function(t,n,r){if(0===this.length)return 0;for(var i=(t<<16|r<<0)>>>0,o=0,a=this.length-1;o+1>>1,l=this._data[s];if(l===i)return s;l>i?a=s:o=s}if(o===a)return o;var c=this._data[o],u=this._data[a];if(c===i)return o;if(u===i)return a;var d=e.getPartIndex(c);return r-e.getCharIndex(c)<=(d!==e.getPartIndex(u)?n:e.getCharIndex(u))-r?o:a}}],[{key:"getPartIndex",value:function(e){return(4294901760&e)>>>16}},{key:"getCharIndex",value:function(e){return(65535&e)>>>0}}]),e}(),h=function e(t,n,i){Object(r.a)(this,e),this.characterMapping=t,this.containsRTL=n,this.containsForeignElements=i};function f(e,t){if(0===e.lineContent.length){var n=0,r="";if(e.lineDecorations.length>0){for(var i=[],a=[],c=0,u=e.lineDecorations.length;c0?''):"",g=a.length>0?''):"";r="".concat(p).concat(g,"")}}return t.appendASCIIString(r),new h(new d(0,0),!1,n)}return function(e,t){var n=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,i=e.containsForeignElements,a=e.lineContent,s=e.len,l=e.isOverflowing,c=e.parts,u=e.fauxIndentLength,f=e.tabSize,p=e.startVisibleColumn,g=e.containsRTL,m=e.spaceWidth,v=e.renderSpaceCharCode,_=e.renderWhitespace,b=e.renderControlCharacters,y=new d(s+1,c.length),S=0,C=p,k=0,E=0,w=0,O=0;g?t.appendASCIIString(''):t.appendASCIIString("");for(var T=0,x=c.length;T=u&&(j+=F)}for(I&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(m*M)),t.appendASCIIString('px"')),t.appendASCII(62);S1?t.write1(8594):t.write1(65515);for(var U=2;U<=B;U++)t.write1(160)}else B=1,t.write1(v);k+=B,S>=u&&(C+=B)}w=M}else{var H=0;for(t.appendASCII(62);S=u&&(C+=W)}w=H}R?E++:E=0,t.appendASCIIString("")}y.setPartData(s,c.length-1,k,O),l&&t.appendASCIIString("");return t.appendASCIIString(""),new h(y,g,i)}(function(e){var t,n,r=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(r[i++]=new l(t,"",0));for(var o=0,a=e.getCount();o=n){r[i++]=new l(n,c,0);break}r[i++]=new l(s,c,0)}}return r}(e.lineTokens,e.fauxIndentLength,n);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(i=function(e,t,n,r){var i,a=e.continuesWithWrappedLine,s=e.fauxIndentLength,c=e.tabSize,u=e.startVisibleColumn,d=e.useMonospaceOptimizations,h=e.selectionsOnLine,f=1===e.renderWhitespace,p=3===e.renderWhitespace,g=e.renderSpaceWidth!==e.spaceWidth,m=[],v=0,_=0,b=r[_].type,y=r[_].endIndex,S=r.length,C=!1,k=o.w(t);-1===k?(C=!0,k=n,i=n):i=o.J(t);for(var E=!1,w=0,O=h&&h[w],T=u%c,x=s;x=O.endOffset&&(w++,O=h&&h[w]);var D=void 0;if(xi)D=!0;else if(9===N)D=!0;else if(32===N)if(f)if(E)D=!0;else{var L=x+1x),D&&p&&(D=C||x>i),E){if(!D||!d&&T>=c){if(g)for(var A=(v>0?m[v-1].endIndex:s)+1;A<=x;A++)m[v++]=new l(A,"mtkw",1);else m[v++]=new l(x,"mtkw",1);T%=c}}else(x===y||D&&x>s)&&(m[v++]=new l(x,b,0),T%=c);for(9===N?T=c:o.E(N)?T+=2:T++,E=D;x===y;)++_0?t.charCodeAt(n-1):0,M=n>1?t.charCodeAt(n-2):0;32===R&&32!==M&&9!==M||(I=!0)}else I=!0;if(I)if(g)for(var P=(v>0?m[v-1].endIndex:s)+1;P<=n;P++)m[v++]=new l(P,"mtkw",1);else m[v++]=new l(n,"mtkw",1);else m[v++]=new l(n,b,0);return m}(e,r,n,i));var a=0;if(e.lineDecorations.length>0){for(var c=0,u=e.lineDecorations.length;cd&&(d=_.startOffset,c[u++]=new l(d,m,v)),!(_.endOffset+1<=g)){d=g,c[u++]=new l(d,m+" "+_.className,v|_.metadata);break}d=_.endOffset+1,c[u++]=new l(d,m+" "+_.className,v|_.metadata),a++}g>d&&(d=g,c[u++]=new l(d,m,v))}var b=n[n.length-1].endIndex;if(a=50&&(i[o++]=new l(f+1,d,h),p=f+1,f=-1);p!==u&&(i[o++]=new l(u,d,h))}else i[o++]=c;r=u}else for(var m=0,v=t.length;m50){for(var S=_.type,C=_.metadata,k=Math.ceil(y/50),E=1;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))}}]),e}());function u(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}l.a.add("platform.keybindingsRegistry",c)},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(11);function i(e,t){var n=Object.create(null);for(var i in t){var o=t[i];o&&(n[i]=Object(r.hc)(o,e))}return n}function o(e,t,n){function r(r){var o=i(e.getColorTheme(),t);"function"===typeof n?n(o):n.style(o)}return r(e.getColorTheme()),e.onDidColorThemeChange(r)}function a(e,t,n){return o(t,{badgeBackground:n&&n.badgeBackground||r.c,badgeForeground:n&&n.badgeForeground||r.d,badgeBorder:r.h},e)}function s(e,t,n){return o(t,Object.assign(Object.assign({},l),n||{}),e)}var l={listFocusBackground:r.xb,listFocusForeground:r.yb,listActiveSelectionBackground:Object(r.i)(r.rb,.1),listActiveSelectionForeground:r.sb,listFocusAndSelectionBackground:r.rb,listFocusAndSelectionForeground:r.sb,listInactiveSelectionBackground:r.Db,listInactiveSelectionForeground:r.Eb,listInactiveFocusBackground:r.Cb,listHoverBackground:r.Ab,listHoverForeground:r.Bb,listDropBackground:r.tb,listFocusOutline:r.b,listSelectionOutline:r.b,listHoverOutline:r.b,listFilterWidgetBackground:r.ub,listFilterWidgetOutline:r.wb,listFilterWidgetNoMatchesOutline:r.vb,listMatchesShadow:r.uc,treeIndentGuidesStroke:r.tc},c={shadowColor:r.uc,borderColor:r.Gb,foregroundColor:r.Hb,backgroundColor:r.Fb,selectionForegroundColor:r.Kb,selectionBackgroundColor:r.Ib,selectionBorderColor:r.Jb,separatorColor:r.Lb};function u(e,t,n){return o(t,Object.assign(Object.assign({},c),n),e)}},function(e,t){e.exports=function(e){return e<-2}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(14),i=n.n(r),o=n(1),a=n(0),s=function e(t){Object(a.a)(this,e),this.element=t,this.next=e.Undefined,this.prev=e.Undefined};s.Undefined=new s(void 0);var l=function(){function e(){Object(a.a)(this,e),this._first=s.Undefined,this._last=s.Undefined,this._size=0}return Object(o.a)(e,[{key:"isEmpty",value:function(){return this._first===s.Undefined}},{key:"clear",value:function(){this._first=s.Undefined,this._last=s.Undefined,this._size=0}},{key:"unshift",value:function(e){return this._insert(e,!1)}},{key:"push",value:function(e){return this._insert(e,!0)}},{key:"_insert",value:function(e,t){var n=this,r=new s(e);if(this._first===s.Undefined)this._first=r,this._last=r;else if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}}},{key:"shift",value:function(){if(this._first!==s.Undefined){var e=this._first.element;return this._remove(this._first),e}}},{key:"pop",value:function(){if(this._last!==s.Undefined){var e=this._last.element;return this._remove(this._last),e}}},{key:"_remove",value:function(e){if(e.prev!==s.Undefined&&e.next!==s.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===s.Undefined&&e.next===s.Undefined?(this._first=s.Undefined,this._last=s.Undefined):e.next===s.Undefined?(this._last=this._last.prev,this._last.next=s.Undefined):e.prev===s.Undefined&&(this._first=this._first.next,this._first.prev=s.Undefined);this._size-=1}},{key:Symbol.iterator,value:i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._first;case 1:if(t===s.Undefined){e.next=7;break}return e.next=4,t.element;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"toArray",value:function(){for(var e=[],t=this._first;t!==s.Undefined;t=t.next)e.push(t.element);return e}},{key:"size",get:function(){return this._size}}]),e}()},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"toMarkdown",value:function(e,t){console.error("toMarkdown not implemented",e,t)}},{key:"parseMarkdown",value:function(){}},{key:"type",get:function(){return"node"}},{key:"markdownToken",get:function(){return""}}]),n}(s(n(162)).default);t.default=l},function(e,t,n){e.exports=function(e,t,n,i){var o,a=i?i-1:1/0;return function(i){if(r(i))return e.enter(n),o=0,s(i);return t(i)};function s(i){return r(i)&&o++=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return r-n<=0?{start:0,end:0}:{start:n,end:r}}function n(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=n,e.intersects=function(e,r){return!n(t(e,r))},e.relativeComplement=function(e,t){var r=[],i={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return n(i)||r.push(i),n(o)||r.push(o),r}}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return f}));var r,i=n(0),o=n(1),a=n(4),s=n(5),l=n(29),c=n(7),u=n(12),d=Object(l.c)("logService");!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"}(r||(r={}));var h=r.Info,f=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return Object(i.a)(this,n),(e=t.call(this)).setLevel(r),e}return Object(o.a)(n,[{key:"trace",value:function(e){if(this.getLevel()<=r.Trace){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o=15&&(d=!1,l=!0);var C=_&&(c||d&&(null==S||S<12.11)),k=n||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var w,O=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return T(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push($(K)+" ");return K[e]}function $(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Se(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){Ce(e),ke(e)}function Oe(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),_&&e.ctrlKey&&1==t&&(t=3),t}var xe,Ne,De=function(){if(a&&s<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Le(e){if(null==xe){var t=N("span","\u200b");x(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(xe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=xe?N("span","\u200b"):N("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Ne)return Ne;var t=x(e,document.createTextNode("A\u062eA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Ne=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me=function(){var e=N("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Pe=null;function je(e){if(null!=Pe)return Pe;var t=x(e,N("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return Pe=Math.abs(n.left-r.left)>1}var Fe={},Be={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function He(e,t){Be[e]=t}function ze(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=ze(t);var n=Fe[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var i=We[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function Ge(e,t){j(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ke(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?it(n,Qe(e,n).text.length):ht(t,Qe(e,t.line).text.length)}function ht(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function ft(e,t){for(var n=[],r=0;r=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.post},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var pt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,n,r){var i=[e.state.modeGen],o={};wt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,wt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),o=mt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function _t(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new gt(r,!0,t);var o=Ot(e,t,n),a=o>r.first&&Qe(r,o-1).stateAfter,s=a?gt.fromSaved(r,a,o):new gt(r,Ye(r.mode),o);return r.iter(o,t,(function(n){bt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,n){return t instanceof pt?new gt(e,qe(e.mode,t.state),n,t.lookAhead):new gt(e,qe(e.mode,t),n)},gt.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pt(t,this.maxLookAhead):t};var Ct=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function kt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Qe(a,(t=dt(a,t)).line),c=_t(e,t.line,n),u=new $e(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&bt(e,t,r,d.pos),d.pos=t.length,l=null):l=Et(St(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;ca;--s){if(s<=o.first)return o.first;var l=Qe(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof pt?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Tt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Qe(e,r).stateAfter;if(i&&(!(i instanceof pt)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new At(a,o.from,s?null:o.to))}}return r}function jt(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;b0)){var u=[l,1],d=ot(c.from,s.from),h=ot(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function Ht(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||Gt(n,o.marker)<0)&&(n=o.marker)}return n}function Qt(e,t,n,r,i){var o=Qe(e,t),a=Nt&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,n)>=0:ot(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,r)<=0:ot(c.from,r)<0)))return!0}}}function Zt(e){for(var t;t=Kt(e);)e=t.find(-1,!0).line;return e}function Xt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function Jt(e){for(var t,n;t=Yt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function en(e,t){var n=Qe(e,t),r=Zt(n);return n==r?t:et(r)}function tn(e,t){if(t>e.lastLine())return t;var n,r=Qe(e,t);if(!nn(e,r))return t;for(;n=Yt(r);)r=n.find(1,!0).line;return et(r)+1}function nn(e,t){var n=Nt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var ln=function(e,t,n){this.text=e,zt(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ht(e),zt(e,n);var i=r?r(e):1;i!=e.height&&Je(e,i)}function un(e){e.parent=null,Ht(e)}ln.prototype.lineNo=function(){return et(this)},Se(ln);var dn={},hn={};function fn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?hn:dn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function pn(e,t){var n=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=mn,Ae(e.display.measure)&&(a=he(o,e.doc.direction))&&(r.addToken=_n(r.addToken,a)),r.map=[],yn(o,r,vt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=R(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=R(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Le(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function gn(e){var t=N("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function mn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?vn(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),g=p?p.index-f:t.length-f;if(g){var m=document.createTextNode(u.slice(f,f+g));a&&s<9?c.appendChild(N("span",[m])):c.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;f+=g+1;var v=void 0;if("\t"==p[0]){var _=e.cm.options.tabSize,b=_-e.col%_;(v=c.appendChild(N("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(N("span","\r"==p[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(N("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||h||o||l){var y=n||"";r&&(y+=r),i&&(y+=i);var S=N("span",[c],y,o);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&S.setAttribute(C,l[C]);return e.content.appendChild(S)}e.content.appendChild(c)}}function vn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c);h++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function bn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function yn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,h,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=s="",h=null,d=null,v=1/0;for(var _=[],b=void 0,y=0;yp||C.collapsed&&S.to==p&&S.from==p)){if(null!=S.to&&S.to!=p&&v>S.to&&(v=S.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&S.from==p&&(u+=" "+C.startStyle),C.endStyle&&S.to==v&&(b||(b=[])).push(C.endStyle,S.to),C.title&&((h||(h={})).title=C.title),C.attributes)for(var k in C.attributes)(h||(h={}))[k]=C.attributes[k];C.collapsed&&(!d||Gt(d.marker,C)<0)&&(d=S)}else S.from>p&&v>S.from&&(v=S.from)}if(b)for(var E=0;E=f)break;for(var O=Math.min(f,v);;){if(m){var T=p+m.length;if(!d){var x=T>O?m.slice(0,O-p):m;t.addToken(t,x,a?a+l:l,u,p+x.length==v?c:"",s,h)}if(T>=O){m=m.slice(O-p),p=O;break}p=T,u=""}m=i.slice(o,o=n[g++]),a=fn(n[g++],t.cm.options)}}else for(var N=1;N2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Zn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Xn(e,t){var n=et(t=Zt(t)),r=e.display.externalMeasured=new Sn(e.doc,t,n);r.lineN=n;var i=r.built=pn(e,r);return r.text=i.pre,x(e.display.lineMeasure,i.pre),r}function Jn(e,t,n,r){return nr(e,tr(e,t),n,r)}function er(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function sr(e,t,n,r){var i,o=or(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Nr(e.display),top:p.top,bottom:p.bottom}:ir}for(var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,_=t.view.measure.heights,b=0;b<_.length-1&&!(v<_[b]);b++);var y=b?_[b-1]:0,S=_[b],C={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:y,bottom:S};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=m),C}function lr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!je(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function cr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=ue(s,l,c),h=ce,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function br(e,t){var n=0;t=dt(e.doc,t),e.options.lineWrapping||(n=Nr(e.display)*t.ch);var r=Qe(e.doc,t.line),i=on(r)+Wn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function yr(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Sr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return yr(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return yr(r.first+r.size-1,Qe(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Qe(r,i);;){var s=wr(e,a,i,t,n),l=$t(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Qe(r,i=c.line)}}function Cr(e,t,n,r){r-=pr(t);var i=t.text.length,o=se((function(t){return nr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=se((function(t){return nr(e,n,t).top>r}),o,i)}}function kr(e,t,n,r){return n||(n=tr(e,t)),Cr(e,t,n,gr(e,t,nr(e,n,r),"line").top)}function Er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function wr(e,t,n,r,i){i-=on(t);var o=tr(e,t),a=pr(t),s=0,l=t.text.length,c=!0,u=he(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Tr:Or)(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,g=null,m=se((function(t){var n=nr(e,o,t);return n.top+=a,n.bottom+=a,!!Er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),s,l),v=!1;if(g){var _=r-g.left=y.bottom?1:0}return yr(n,m=ae(t.text,m,1),f,v,r-h)}function Or(e,t,n,r,i,o,a){var s=se((function(s){var l=i[s],c=1!=l.level;return Er(_r(e,it(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=_r(e,it(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Er(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function Tr(e,t,n,r,i,o,a){var s=Cr(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||f.to<=l)){var p=nr(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=pg)&&(u=f,d=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function xr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rr){rr=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(N("br"));rr.appendChild(document.createTextNode("x"))}x(e.measure,rr);var n=rr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function Nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t],"CodeMirror-line-like");x(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:Lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ar(e){var t=xr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(i){if(nn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Qe(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=it(c.line,Math.max(0,Math.round((o-qn(e.display).left)/Nr(e.display))-u))}return c}function Mr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Nt&&en(e.doc,t)i.viewFrom?Fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Fr(e);else if(t<=i.viewFrom){var o=Br(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Fr(e)}else if(n>=i.viewTo){var a=Br(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Fr(e)}else{var s=Br(e,t,t,-1),l=Br(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Cn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Mr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function Fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Br(e,t,n,r){var i,o=Mr(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;en(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Ur(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Cn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Cn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Mr(e,n)))),r.viewTo=n}function Hr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval((function(){e.hasFocus()||Zr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Qr(e))}function $r(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zr(e))}),100)}function Qr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Kr(e))}function Zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Xr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||h<-.005)&&(Je(i.line,l),Jr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/Nr(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Jr(e){if(e.widgets)for(var t=0;t=a&&(o=tt(t,on(Qe(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Wn(e.display))+"px;\n height: "+(t.bottom-t.top+Kn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?it(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=_r(e,t),l=n&&n!=t?_r(e,n):s,c=ii(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(di(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(fi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ri(e,t){var n=ii(e,t);null!=n.scrollTop&&di(e,n.scrollTop),null!=n.scrollLeft&&fi(e,n.scrollLeft)}function ii(e,t){var n=e.display,r=xr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=$n(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Gn(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Yn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+h-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function li(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ui(e,br(e,t.from),br(e,t.to),t.margin))}function ui(e,t,n,r){var i=ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||zi(e,{top:t}),hi(e,t,!0),n&&zi(e),Ri(e,100))}function hi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function fi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Gn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var gi=function(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},gi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},gi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},gi.prototype.zeroWidthHack=function(){var e=_&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},gi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},gi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function vi(e,t){t||(t=pi(e));var n=e.display.barWidth,r=e.display.barHeight;_i(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Xr(e),_i(e,pi(e)),n=e.display.barWidth,r=e.display.barHeight}function _i(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var bi={native:gi,null:mi};function yi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?fi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Si=0;function Ci(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Si},En(e.curOp)}function ki(e){var t=e.curOp;t&&On(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Pi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Oi(e){e.updatedDisplay=e.mustUpdate&&Ui(e.cm,e.update)}function Ti(e){var t=e.cm,n=t.display;e.updatedDisplay&&Xr(t),e.barMeasure=pi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Jn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function xi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=_t(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,l=mt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return Ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Di(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hr(e))return!1;Ki(e)&&(Fr(e),t.dims=Dr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Nt&&(o=en(e.doc,o),a=tn(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ur(e,o,a),n.viewOffset=on(Qe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Hr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Fi(e);return l>4&&(n.lineDiv.style.display="none"),Vi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Bi(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ri(e,400)),n.updateLineNumbers=null,!0}function Hi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))r&&(t.visible=ei(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Gn(e.display)-$n(e),n.top)}),t.visible=ei(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ui(e,t))break;Xr(e);var i=pi(e);zr(e),vi(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function zi(e,t){var n=new Pi(e,t);if(Ui(e,n)){Xr(e),Hi(e,n);var r=pi(e);zr(e),vi(e,r),Gi(e,r),n.finish()}}function Vi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&_&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(f=!1),Dn(e,h,u,n)),f&&(T(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),a=h.node.nextSibling}else{var p=Fn(e,h,u,n);o.insertBefore(p,a)}u+=h.size}for(;a;)a=s(a)}function Wi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kn(e)+"px"}function qi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&_&&l)e:for(var h=t.target,f=a.view;h!=s;h=h.parentNode)for(var p=0;p=0&&ot(e,r.to())<=0)return n}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:l>=0){var c=ct(s.from(),a.from()),u=lt(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new io(d?u:c,d?c:u))}}return new ro(t,n)}function ao(e,t){return new ro([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function lo(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=so(t).ch-t.to.ch),it(n,r)}function co(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}xn(e,"change",e,t)}function vo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}function wo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Eo(i,i.lastOp==r)))a=$(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=so(t):o.changes.push(Co(e,t));else{var l=$(i.done);for(l&&l.ranges||xo(e.sel,i.done),o={changes:[Co(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Oo(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function To(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Oo(e,o,$(i.done),t))?i.done[i.done.length-1]=t:xo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ko(i.undone)}function xo(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function No(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,n=0;n-1&&($(s)[d]=c[d],delete c[d])}}}return r}function Ro(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new io(i,t)}return new io(n||t,t)}function Mo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ho(e,new ro([Ro(e.sel.primary(),t,n,i)],0),r)}function Po(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=Yo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=ot(d,n))&&(r<0?h<0:h>0))return qo(e,d,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=Yo(e,f,r,f.line==t.line?o:null)),f?qo(e,f,t,r,i):null}}return t}function Ko(e,t,n,r,i){var o=r||1,a=qo(e,t,n,o,i)||!i&&qo(e,t,n,o,!0)||qo(e,t,n,-o,i)||!i&&qo(e,t,n,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Yo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:n>0&&t.ch==(r||Qe(e,t.line)).text.length?t.line=0;--i)Xo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Xo(e,t)}}function Xo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=co(e,t);wo(e,t,n,e.cm?e.cm.curOp.id:NaN),ta(e,t,n,Ft(e,t));var r=[];vo(e,(function(e,n){n||-1!=U(r,e.history)||(aa(e.history,t),r.push(e.history)),ta(e,t,null,Ft(e,t))}))}}function Jo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c=0;--f){var p=h(f);if(p)return p.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(Q(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Pr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:it(o,Qe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),n||(n=co(e,t)),e.cm?na(e.cm,t,r):mo(e,t,r),zo(e,n,V),e.cantEdit&&Ko(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function na(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=et(Zt(Qe(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),mo(r,t,n,Ar(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=an(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Tt(r,o.line),Ri(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Pr(e):o.line!=a.line||1!=t.text.length||go(e.doc,t)?Pr(e,o.line,a.line+1,c):jr(e,o.line,"text");var u=ye(e,"changes"),d=ye(e,"change");if(d||u){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&xn(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ra(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Zo(e,{from:n,to:r,text:t,origin:i})}function ia(e,t,n,r){n1||!(this.children[0]instanceof la))){var s=[];this.collapse(s),this.children=[new la(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Qt(e,t.line,t,n,o)||t.line!=n.line&&Qt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}o.addToHistory&&wo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Zt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Je(e,0),Mt(e,new At(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){nn(e,t)&&Je(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++fa,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Pr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)jr(c,u,"text");o.atomic&&Wo(c.doc),xn(c,"markerAdded",c,o)}return o}pa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ci(e),ye(this,"clear")){var n=this.find();n&&xn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Wo(e.doc)),e&&xn(e,"markerCleared",e,this,r,i),t&&ki(e),this.parent&&this.parent.clear()}},pa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)Zo(this,r[l]);s?Uo(this,s):this.cm&&ai(this.cm)})),undo:Ii((function(){Jo(this,"undo")})),redo:Ii((function(){Jo(this,"redo")})),undoSelection:Ii((function(){Jo(this,"undo",!0)})),redoSelection:Ii((function(){Jo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=dt(this,e),t=dt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),dt(this,it(n,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),zo(t.doc,ao(n,n)),h)for(var f=0;f=0;t--)ra(e.doc,"",r[t].from,r[t].to,"+delete");ai(e)}))}function qa(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ka(e,t,n){var r=qa(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Ya(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=he(n,t.doc.direction);if(o){var a,s=i<0?$(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=tr(t,n);a=i<0?n.text.length-1:0;var u=nr(t,c,a).top;a=se((function(e){return nr(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=qa(n,a,1))}else a=i<0?s.to:s.from;return new it(r,a,l)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}function $a(e,t,n,r){var i=he(t,e.doc.direction);if(!i)return Ka(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&h>=u.begin)){var f=d?"before":"after";return new it(n.line,h,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,l(e,1),"before"):new it(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==m||r>0&&m==t.text.length||!(g=p(r>0?0:i.length-1,r,c(m)))?null:g}ja.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ja.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ja.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ja.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ja.default=_?ja.macDefault:ja.pcDefault;var Qa={selectAll:$o,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Ga(e,(function(t){if(t.empty()){var n=Qe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Qe(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}n.push(new io(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?Ss(e,r,t,o):ks(e,r,t,o)}function Ss(e,t,n,r){var i=e.display,o=!1,c=Li(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:$r(e)),me(i.wrapper.ownerDocument,"mouseup",c),me(i.wrapper.ownerDocument,"mousemove",u),me(i.scroller,"dragstart",d),me(i.scroller,"drop",c),o||(Ce(t),r.addNew||Mo(e.doc,n,null,null,r.extend),l&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Cs(e,t,n){if("char"==n)return new io(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new io(it(t.line,0),dt(e.doc,it(t.line+1,0)));var r=n(e,t);return new io(r.from,r.to)}function ks(e,t,n,r){a&&$r(e);var i=e.display,o=e.doc;Ce(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new io(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new io(n,n)),n=Rr(e,t,!0,!0),l=-1;else{var d=Cs(e,n,r.unit);s=r.extend?Ro(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=u.length,Ho(o,oo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(Ho(o,oo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):jo(o,l,s,W):(l=0,Ho(o,new ro([s],0),W),c=o.sel);var h=n;function f(t){if(0!=ot(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=F(Qe(o,n.line).text,n.ch,a),d=F(Qe(o,t.line).text,t.ch,a),f=Math.min(u,d),p=Math.max(u,d),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Qe(o,g).text,_=q(v,f,a);f==p?i.push(new io(it(g,_),it(g,_))):v.length>_&&i.push(new io(it(g,_),it(g,q(v,p,a))))}i.length||i.push(new io(n,n)),Ho(o,oo(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,y=s,S=Cs(e,t,r.unit),C=y.anchor;ot(S.anchor,C)>0?(b=S.head,C=ct(y.from(),S.anchor)):(b=S.anchor,C=lt(y.to(),S.head));var k=c.ranges.slice(0);k[l]=Es(e,new io(dt(o,C),b)),Ho(o,oo(e,k,l),W)}}var p=i.wrapper.getBoundingClientRect(),g=0;function m(t){var n=++g,a=Rr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=ot(a,h)){e.curOp.focus=A(),f(a);var s=ei(i,o);(a.line>=s.to||a.linep.bottom?20:0;l&&setTimeout(Li(e,(function(){g==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function v(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),me(i.wrapper.ownerDocument,"mousemove",_),me(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var _=Li(e,(function(e){0!==e.buttons&&Te(e)?m(e):v(e)})),b=Li(e,v);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",_),pe(i.wrapper.ownerDocument,"mouseup",b)}function Es(e,t){var n=t.anchor,r=t.head,i=Qe(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=he(i);if(!o)return t;var a=ue(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?t:new io(new it(n.line,p,g),r)}function ws(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(u){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ce(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return Ee(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return ve(e,n,e,tt(e.doc,o),e.display.gutterSpecs[l].className,t),Ee(t)}}function Os(e,t){return ws(e,t,"gutterClick",!0)}function Ts(e,t){Vn(e.display,t)||xs(e,t)||_e(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function xs(e,t){return!!ye(e,"gutterContextMenu")&&ws(e,t,"gutterContextMenu",!1)}function Ns(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dr(e)}gs.prototype.compare=function(e,t,n){return this.time+ps>e&&0==ot(t,this.pos)&&n==this.button};var Ds={toString:function(){return"CodeMirror.Init"}},Ls={},As={};function Is(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ds&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ds,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,fo(e)}),!0),n("indentUnit",2,fo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){po(e),dr(e),Pr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ra(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ds&&e.refresh()})),n("specialCharPlaceholder",gn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!y),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ns(e),Qi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Wa(t),i=n!=Ds&&Wa(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ms,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Qi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),n("scrollbarStyle","native",(function(e){yi(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Qi(e)}),!0),n("firstLineNumber",1,Qi,!0),n("lineNumberFormatter",(function(e){return e}),Qi,!0),n("showCursorWhenSelecting",!1,zr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Zr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Rs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zr,!0),n("singleCursorHeightPerLine",!0,zr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,po,!0),n("addModeClass",!1,po,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,po,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Rs(e,t,n){if(!t!=!(n&&n!=Ds)){var r=e.display.dragFunctions,i=t?pe:me;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Ms(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),sn(e)),Ir(e),Pr(e),dr(e),setTimeout((function(){return vi(e)}),100)}function Ps(e,t){var n=this;if(!(this instanceof Ps))return new Ps(e,t);this.options=t=t?j(t):{},j(Ls,t,!1);var r=t.value;"string"==typeof r?r=new Ca(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ps.inputStyles[t.inputStyle](this),o=this.display=new Zi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ns(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),yi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),js(this),Da(),Ci(this),this.curOp.forceUpdate=!0,_o(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qr(n)}),20):Zr(this),As)As.hasOwnProperty(c)&&As[c](this,t[c],Ds);Ki(this),t.finishInit&&t.finishInit(this);for(var u=0;u400}pe(t.scroller,"touchstart",(function(i){if(!_e(e,i)&&!o(i)&&!Os(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Vn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new io(a,a):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(a):new io(it(a.line,0),dt(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),fi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||we(t)},over:function(t){_e(e,t)||(Oa(e,t),we(t))},start:function(t){return wa(e,t)},drop:Li(e,Ea),leave:function(t){_e(e,t)||Ta(e)}};var c=t.input.getField();pe(c,"keyup",(function(t){return us.call(e,t)})),pe(c,"keydown",Li(e,ls)),pe(c,"keypress",Li(e,ds)),pe(c,"focus",(function(t){return Qr(e,t)})),pe(c,"blur",(function(t){return Zr(e,t)}))}Ps.defaults=Ls,Ps.optionHandlers=As;var Fs=[];function Bs(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=_t(e,t).state:n="prev");var a=e.options.tabSize,s=Qe(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==z||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?F(Qe(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+="\t";if(ha,l=Ie(t),c=null;if(s&&r.ranges.length>1)if(Us&&Us.text.join("\n")==t){if(r.ranges.length%Us.text.length==0){c=[];for(var u=0;u=0;h--){var f=r.ranges[h],p=f.from(),g=f.to();f.empty()&&(n&&n>0?p=it(p.line,p.ch-n):e.state.overwrite&&!s?g=it(g.line,Math.min(Qe(o,g.line).text.length,g.ch+$(l).length)):s&&Us&&Us.lineWise&&Us.text.join("\n")==l.join("\n")&&(p=g=it(p.line,0)));var m={from:p,to:g,text:c?c[h%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Zo(e.doc,m),xn(e,"inputRead",e,m)}t&&!s&&Ws(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Vs(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return zs(t,n,0,null,"paste")})),!0}function Ws(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Bs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Bs(e,i.head.line,"smart"));a&&xn(e,"electricInput",e,i.head.line)}}}function Gs(e){for(var t=[],n=[],r=0;rn&&(Bs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&jo(this.doc,r,new io(o,c[r].to()),V)}}})),getTokenAt:function(e,t){return kt(this,e,t)},getLineTokens:function(e,t){return kt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,n=vt(this,Qe(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Qe(this.doc,e)}else r=e;return gr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return xr(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=_r(this,dt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&ri(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ai(ls),triggerOnKeyPress:Ai(ds),triggerOnKeyUp:us,triggerOnMouseDown:Ai(vs),execCommand:function(e){if(Qa.hasOwnProperty(e))return Qa[e].call(null,this)},triggerElectric:Ai((function(e){Ws(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&Ir(this),ve(this,"refresh",this)})),swapDoc:Ai((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),_o(this,e),dr(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,xn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Se(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function $s(e,t,n,r,i){var o=t,a=n,s=Qe(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n=e.first+e.size)&&(t=new it(n,t.ch,t.sticky),s=Qe(e,n))}function u(o){var a;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));a=isNaN(u)?null:new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?$a(e.cm,s,t,n):Ka(s,t,n);if(null==a){if(o||!c())return!1;t=Ya(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,h="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var g=s.text.charAt(t.ch)||"\n",m=ne(g,f)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||m||(m="s"),d&&d!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(d=m),n>0&&!u(!p))break}var v=Ko(e,t,o,a,!0);return at(o,v)&&(v.hitSide=!0),v}function Qs(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*xr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Sr(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Zs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Xs(e,t){var n=er(e,t.line);if(!n||n.hidden)return null;var r=Qe(e.doc,t.line),i=Zn(n,r,t.line),o=he(r,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=or(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function el(e,t){return t&&(e.bad=!0),e}function tl(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function d(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(it(r,0),it(i+1,0),c(+f));return void(p.length&&(o=p[0].find(0))&&d(Ze(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&u();for(var m=0;m=t.display.viewTo||o.line=t.display.viewFrom&&Xs(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=it(a.line-1,Qe(r.doc,a.line-1).length)),s.ch==Qe(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Mr(r,a.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=Mr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(tl(r,n,c,t,l)),h=Ze(r.doc,it(t,0),it(l,Qe(r.doc,l).text.length));d.length>1&&h.length>1;)if($(d)==$(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);fa.ch&&_.charCodeAt(_.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;d[d.length-1]=_.slice(0,_.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var S=it(t,f),C=it(l,h.length?$(h).length-p:0);return d.length>1||d[0]||ot(S,C)?(ra(r.doc,d,S,C,"+input"),!0):void 0},Zs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zs.prototype.reset=function(){this.forceCompositionEnd()},Zs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zs.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Zs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return Pr(e.cm)}))},Zs.prototype.setUneditable=function(e){e.contentEditable="false"},Zs.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Li(this.cm,zs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Zs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Zs.prototype.onContextMenu=function(){},Zs.prototype.resetPosition=function(){},Zs.prototype.needsContentAttribute=!0;var il=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};function ol(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=A();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(me(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ps((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function al(e){e.off=me,e.on=pe,e.wheelEventPixels=to,e.Doc=Ca,e.splitLines=Ie,e.countColumn=F,e.findColumn=q,e.isWordChar=te,e.Pass=z,e.signal=ve,e.Line=ln,e.changeEnd=so,e.scrollbarModel=bi,e.Pos=it,e.cmpPos=ot,e.modes=Fe,e.mimeModes=Be,e.resolveMode=ze,e.getMode=Ve,e.modeExtensions=We,e.extendMode=Ge,e.copyState=qe,e.startState=Ye,e.innerMode=Ke,e.commands=Qa,e.keyMap=ja,e.keyName=Va,e.isModifierKey=Ha,e.lookupKey=Ua,e.normalizeKeyMap=Ba,e.StringStream=$e,e.SharedTextMarker=ma,e.TextMarker=pa,e.LineWidget=ua,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=we,e.addClass=I,e.contains=L,e.rmClass=O,e.keyNames=Ia}il.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!_e(r,e)){if(r.somethingSelected())Hs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Gs(r);Hs({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){_e(r,e)||Vs(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Vn(e,t)&&!_e(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Vn(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},il.prototype.createField=function(e){this.wrapper=Ks(),this.textarea=this.wrapper.firstChild},il.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},il.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Vr(e);if(e.options.moveInputWithCursor){var i=_r(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},il.prototype.showSelection=function(e){var t=this.cm.display;x(t.cursorDiv,e.cursors),x(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},il.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},il.prototype.getField=function(){return this.textarea},il.prototype.supportsTouch=function(){return!1},il.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||A()!=this.textarea))try{this.textarea.focus()}catch(e){}},il.prototype.blur=function(){this.textarea.blur()},il.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},il.prototype.receivedFocus=function(){this.slowPoll()},il.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},il.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},il.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||_&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},il.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},il.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},il.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Rr(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Li(n,Ho)(n.doc,ao(o),V);var u,h=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),k?(we(e),pe(window,"mouseup",(function e(){me(window,"mouseup",e),setTimeout(m,20)}))):setTimeout(m,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="\u200b"+(e?i.value:"");i.value="\u21da",i.value=o,t.prevInput=e?"":"\u200b",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function o(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==t.prevInput?Li(n,$o)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},il.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},il.prototype.setUneditable=function(){},il.prototype.needsContentAttribute=!1,Is(Ps),Ys(Ps);var sl="iter insert remove copy getEditor constructor".split(" ");for(var ll in Ca.prototype)Ca.prototype.hasOwnProperty(ll)&&U(sl,ll)<0&&(Ps.prototype[ll]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ca.prototype[ll]));return Se(Ca),Ps.inputStyles={textarea:il,contenteditable:Zs},Ps.defineMode=function(e){Ps.defaults.mode||"null"==e||(Ps.defaults.mode=e),Ue.apply(this,arguments)},Ps.defineMIME=He,Ps.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ps.defineMIME("text/plain","null"),Ps.defineExtension=function(e,t){Ps.prototype[e]=t},Ps.defineDocExtension=function(e,t){Ca.prototype[e]=t},Ps.fromTextArea=ol,al(Ps),Ps.version="5.58.3",Ps}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return P})),n.d(t,"a",(function(){return j}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(1),l=n(0),c=(n(457),n(3)),u=n(47),d=n(77),h=n(107),f=n(88),p=n(32),g=11,m=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._onActivate=e.onActivate,r.bgDomNode=document.createElement("div"),r.bgDomNode.className="arrow-background",r.bgDomNode.style.position="absolute",r.bgDomNode.style.width=e.bgWidth+"px",r.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(r.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(r.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(r.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(r.bgDomNode.style.right="0px"),r.domNode=document.createElement("div"),r.domNode.className=e.className,Object(c.addClasses)(r.domNode,e.icon.classNames),r.domNode.style.position="absolute",r.domNode.style.width="11px",r.domNode.style.height="11px","undefined"!==typeof e.top&&(r.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(r.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(r.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(r.domNode.style.right=e.right+"px"),r._mouseMoveMonitor=r._register(new h.a),r.onmousedown(r.bgDomNode,(function(e){return r._arrowMouseDown(e)})),r.onmousedown(r.domNode,(function(e){return r._arrowMouseDown(e)})),r._mousedownRepeatTimer=r._register(new p.c),r._mousedownScheduleRepeatTimer=r._register(new p.e),r}return Object(s.a)(n,[{key:"_arrowMouseDown",value:function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((function(){t._mousedownRepeatTimer.cancelAndSet((function(){return t._onActivate()}),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,h.b,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}]),n}(f.a),v=n(7),_=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i){var o;return Object(l.a)(this,n),(o=t.call(this))._visibility=e,o._visibleClassName=r,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new p.e),o}return Object(s.a)(n,[{key:"applyVisibilitySetting",value:function(e){return 2!==this._visibility&&(3===this._visibility||e)}},{key:"setShouldBeVisible",value:function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}},{key:"setIsNeeded",value:function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}},{key:"setDomNode",value:function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}},{key:"ensureVisibility",value:function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}},{key:"_reveal",value:function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((function(){e._domNode&&e._domNode.setClassName(e._visibleClassName)}),0))}},{key:"_hide",value:function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}]),n}(v.a),b=n(21),y=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._lazyRender=e.lazyRender,r._host=e.host,r._scrollable=e.scrollable,r._scrollbarState=e.scrollbarState,r._visibilityController=r._register(new _(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),r._visibilityController.setIsNeeded(r._scrollbarState.isNeeded()),r._mouseMoveMonitor=r._register(new h.a),r._shouldRender=!0,r.domNode=Object(u.b)(document.createElement("div")),r.domNode.setAttribute("role","presentation"),r.domNode.setAttribute("aria-hidden","true"),r._visibilityController.setDomNode(r.domNode),r.domNode.setPosition("absolute"),r.onmousedown(r.domNode.domNode,(function(e){return r._domNodeMouseDown(e)})),r}return Object(s.a)(n,[{key:"_createArrow",value:function(e){var t=this._register(new m(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}},{key:"_createSlider",value:function(e,t,n,r){var i=this;this.slider=Object(u.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof n&&this.slider.setWidth(n),"number"===typeof r&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),i._sliderMouseDown(e,(function(){})))})),this.onclick(this.slider.domNode,(function(e){e.leftButton&&e.stopPropagation()}))}},{key:"_onElementSize",value:function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}},{key:"_onElementScrollSize",value:function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}},{key:"_onElementScrollPosition",value:function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}},{key:"beginReveal",value:function(){this._visibilityController.setShouldBeVisible(!0)}},{key:"beginHide",value:function(){this._visibilityController.setShouldBeVisible(!1)}},{key:"render",value:function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}},{key:"_domNodeMouseDown",value:function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}},{key:"delegateMouseDown",value:function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderMousePosition(e);n<=i&&i<=r?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)}},{key:"_onMouseDown",value:function(e){var t,n;if(e.target===this.domNode.domNode&&"number"===typeof e.browserEvent.offsetX&&"number"===typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var r=c.getDomNodePagePosition(this.domNode.domNode);t=e.posx-r.left,n=e.posy-r.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))}},{key:"_sliderMouseDown",value:function(e,t){var n=this,r=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,h.b,(function(e){var t=n._sliderOrthogonalMousePosition(e),a=Math.abs(t-i);if(b.i&&a>140)n._setDesiredScrollPositionNow(o.getScrollPosition());else{var s=n._sliderMousePosition(e)-r;n._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(s))}}),(function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()})),this._host.onDragStart()}},{key:"_setDesiredScrollPositionNow",value:function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}},{key:"updateScrollbarSize",value:function(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}}]),n}(f.a),S=function(){function e(t,n,r,i,o,a){Object(l.a)(this,e),this._scrollbarSize=Math.round(n),this._oppositeScrollbarSize=Math.round(r),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return Object(s.a)(e,[{key:"clone",value:function(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}},{key:"setVisibleSize",value:function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}},{key:"setScrollSize",value:function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}},{key:"setScrollPosition",value:function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}},{key:"setScrollbarSize",value:function(e){this._scrollbarSize=e}},{key:"_refreshComputedValues",value:function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}},{key:"getArrowSize",value:function(){return this._arrowSize}},{key:"getScrollPosition",value:function(){return this._scrollPosition}},{key:"getRectangleLargeSize",value:function(){return this._computedAvailableSize}},{key:"getRectangleSmallSize",value:function(){return this._scrollbarSize}},{key:"isNeeded",value:function(){return this._computedIsNeeded}},{key:"getSliderSize",value:function(){return this._computedSliderSize}},{key:"getSliderPosition",value:function(){return this._computedSliderPosition}},{key:"getDesiredScrollPositionFromOffset",value:function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}},{key:"getDesiredScrollPositionFromDelta",value:function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}],[{key:"_computeValues",value:function(e,t,n,r,i){var o=Math.max(0,n-e),a=Math.max(0,o-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(o),computedIsNeeded:s,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};var l=Math.round(Math.max(20,Math.floor(n*a/r))),c=(a-l)/(r-n),u=i*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:s,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(u)}}}]),e}(),C=n(26),k=Object(C.e)("scrollbar-button-left",C.a.triangleLeft),E=Object(C.e)("scrollbar-button-right",C.a.triangleRight),w=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i){var o;Object(l.a)(this,n);var a=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(o=t.call(this,{lazyRender:r.lazyRender,host:i,scrollbarState:new S(r.horizontalHasArrows?r.arrowSize:0,2===r.horizontal?0:r.horizontalScrollbarSize,2===r.vertical?0:r.verticalScrollbarSize,a.width,a.scrollWidth,s.scrollLeft),visibility:r.horizontal,extraScrollbarClassName:"horizontal",scrollable:e}),r.horizontalHasArrows){var c=(r.arrowSize-g)/2,u=(r.horizontalScrollbarSize-g)/2;o._createArrow({className:"scra",icon:k,top:u,left:c,bottom:void 0,right:void 0,bgWidth:r.arrowSize,bgHeight:r.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new d.b(null,1,0))}}),o._createArrow({className:"scra",icon:E,top:u,left:void 0,bottom:void 0,right:c,bgWidth:r.arrowSize,bgHeight:r.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new d.b(null,-1,0))}})}return o._createSlider(Math.floor((r.horizontalScrollbarSize-r.horizontalSliderSize)/2),0,void 0,r.horizontalSliderSize),o}return Object(s.a)(n,[{key:"_updateSlider",value:function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}},{key:"_renderDomNode",value:function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}},{key:"onDidScroll",value:function(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}},{key:"_mouseDownRelativePosition",value:function(e,t){return e}},{key:"_sliderMousePosition",value:function(e){return e.posx}},{key:"_sliderOrthogonalMousePosition",value:function(e){return e.posy}},{key:"_updateScrollbarSize",value:function(e){this.slider.setHeight(e)}},{key:"writeScrollPosition",value:function(e,t){e.scrollLeft=t}}]),n}(y),O=Object(C.e)("scrollbar-button-up",C.a.triangleUp),T=Object(C.e)("scrollbar-button-down",C.a.triangleDown),x=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i){var o;Object(l.a)(this,n);var a=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(o=t.call(this,{lazyRender:r.lazyRender,host:i,scrollbarState:new S(r.verticalHasArrows?r.arrowSize:0,2===r.vertical?0:r.verticalScrollbarSize,0,a.height,a.scrollHeight,s.scrollTop),visibility:r.vertical,extraScrollbarClassName:"vertical",scrollable:e}),r.verticalHasArrows){var c=(r.arrowSize-g)/2,u=(r.verticalScrollbarSize-g)/2;o._createArrow({className:"scra",icon:O,top:c,left:u,bottom:void 0,right:void 0,bgWidth:r.verticalScrollbarSize,bgHeight:r.arrowSize,onActivate:function(){return o._host.onMouseWheel(new d.b(null,0,1))}}),o._createArrow({className:"scra",icon:T,top:void 0,left:u,bottom:c,right:void 0,bgWidth:r.verticalScrollbarSize,bgHeight:r.arrowSize,onActivate:function(){return o._host.onMouseWheel(new d.b(null,0,-1))}})}return o._createSlider(0,Math.floor((r.verticalScrollbarSize-r.verticalSliderSize)/2),r.verticalSliderSize,void 0),o}return Object(s.a)(n,[{key:"_updateSlider",value:function(e,t){this.slider.setHeight(e),this.slider.setTop(t)}},{key:"_renderDomNode",value:function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}},{key:"onDidScroll",value:function(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}},{key:"_mouseDownRelativePosition",value:function(e,t){return t}},{key:"_sliderMousePosition",value:function(e){return e.posy}},{key:"_sliderOrthogonalMousePosition",value:function(e){return e.posx}},{key:"_updateScrollbarSize",value:function(e){this.slider.setWidth(e)}},{key:"writeScrollPosition",value:function(e,t){e.scrollTop=t}}]),n}(y),N=n(12),D=n(211),L=n(46),A=function e(t,n,r){Object(l.a)(this,e),this.timestamp=t,this.deltaX=n,this.deltaY=r,this.score=0},I=function(){function e(){Object(l.a)(this,e),this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return Object(s.a)(e,[{key:"isPhysicalMouseWheel",value:function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,n=1,r=this._rear;;){var i=r===this._front?e:Math.pow(2,-n);if(e-=i,t+=this._memory[r].score*i,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}return t<=.5}},{key:"accept",value:function(e,t,n){var r=new A(e,t,n);r.score=this._computeScore(r),-1===this._front&&-1===this._rear?(this._memory[0]=r,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]=r)}},{key:"_computeScore",value:function(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;var 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)}},{key:"_isAlmostInt",value:function(e){return Math.abs(Math.round(e)-e)<.01}}]),e}();I.INSTANCE=new I;var R=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i){var o;Object(l.a)(this,n),(o=t.call(this))._onScroll=o._register(new N.a),o.onScroll=o._onScroll.event,o._onWillScroll=o._register(new N.a),e.style.overflow="hidden",o._options=function(e){var 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};t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,b.f&&(t.className+=" mac");return t}(r),o._scrollable=i,o._register(o._scrollable.onScroll((function(e){o._onWillScroll.fire(e),o._onDidScroll(e),o._onScroll.fire(e)})));var a={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new x(o._scrollable,o._options,a)),o._horizontalScrollbar=o._register(new w(o._scrollable,o._options,a)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(e),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows?(o._leftShadowDomNode=Object(u.b)(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=Object(u.b)(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=Object(u.b)(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)):(o._leftShadowDomNode=null,o._topShadowDomNode=null,o._topLeftShadowDomNode=null),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,(function(e){return o._onMouseOver(e)})),o.onnonbubblingmouseout(o._listenOnDomNode,(function(e){return o._onMouseOut(e)})),o._hideTimeout=o._register(new p.e),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return Object(s.a)(n,[{key:"dispose",value:function(){this._mouseWheelToDispose=Object(v.f)(this._mouseWheelToDispose),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getOverviewRulerLayoutInfo",value:function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}},{key:"delegateVerticalScrollbarMouseDown",value:function(e){this._verticalScrollbar.delegateMouseDown(e)}},{key:"getScrollDimensions",value:function(){return this._scrollable.getScrollDimensions()}},{key:"setScrollDimensions",value:function(e){this._scrollable.setScrollDimensions(e,!1)}},{key:"updateClassName",value:function(e){this._options.className=e,b.f&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}},{key:"updateOptions",value:function(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()}},{key:"_setListeningToMouseWheel",value:function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Object(v.f)(this._mouseWheelToDispose),e)){this._mouseWheelToDispose.push(c.addDisposableListener(this._listenOnDomNode,c.EventType.MOUSE_WHEEL,(function(e){t._onMouseWheel(new d.b(e))}),{passive:!1}))}}},{key:"_onMouseWheel",value:function(e){var t=I.INSTANCE,n=window.devicePixelRatio/Object(L.c)();if(b.i||b.d?t.accept(Date.now(),e.deltaX/n,e.deltaY/n):t.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;if(this._options.scrollPredominantAxis&&(Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes){var o=[i,r];r=o[0],i=o[1]}var a=!b.f&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!a||i||(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);var s=this._scrollable.getFutureScrollPosition(),l={};if(r){var c=s.scrollTop-50*r;this._verticalScrollbar.writeScrollPosition(l,c)}if(i){var u=s.scrollLeft-50*i;this._horizontalScrollbar.writeScrollPosition(l,u)}if(l=this._scrollable.validateScrollPosition(l),s.scrollLeft!==l.scrollLeft||s.scrollTop!==l.scrollTop)this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),this._shouldRender=!0}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())}},{key:"_onDidScroll",value:function(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()}},{key:"renderNow",value:function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}},{key:"_render",value:function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}}},{key:"_onDragStart",value:function(){this._isDragging=!0,this._reveal()}},{key:"_onDragEnd",value:function(){this._isDragging=!1,this._hide()}},{key:"_onMouseOut",value:function(e){this._mouseIsOver=!1,this._hide()}},{key:"_onMouseOver",value:function(e){this._mouseIsOver=!0,this._reveal()}},{key:"_reveal",value:function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}},{key:"_hide",value:function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}},{key:"_scheduleHide",value:function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((function(){return e._hide()}),500)}}]),n}(f.a),M=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;Object(l.a)(this,n),(r=r||{}).mouseWheelSmoothScroll=!1;var o=new D.a(0,(function(e){return c.scheduleAtNextAnimationFrame(e)}));return(i=t.call(this,e,r,o))._register(o),i}return Object(s.a)(n,[{key:"setScrollPosition",value:function(e){this._scrollable.setScrollPositionNow(e)}}]),n}(R),P=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i){return Object(l.a)(this,n),t.call(this,e,r,i)}return Object(s.a)(n,[{key:"setScrollPosition",value:function(e){this._scrollable.setScrollPositionNow(e)}},{key:"getScrollPosition",value:function(){return this._scrollable.getCurrentScrollPosition()}}]),n}(R),j=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(l.a)(this,n),(i=t.call(this,e,r))._element=e,i.onScroll((function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)})),i.scanDomNode(),i}return Object(s.a)(n,[{key:"scanDomNode",value:function(){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})}}]),n}(M)},function(e,t,n){e.exports=n(563)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"b",(function(){return m}));var r=n(0),i=n(1),o=n(15),a=n(123),s=n(19),l=n(8),c=n(67),u=function(){function e(t,n,i,o){Object(r.a)(this,e),this.searchString=t,this.isRegex=n,this.matchCase=i,this.wordSeparators=o}return Object(i.a)(e,[{key:"parseSearchRequest",value:function(){if(""===this.searchString)return null;var e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var r=e.charCodeAt(t);if(110===r||114===r||87===r||119===r)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;var t=null;try{t=o.q(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(r){return null}if(!t)return null;var n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new d(t,this.wordSeparators?Object(a.a)(this.wordSeparators):null,n?this.searchString:null)}}]),e}();var d=function e(t,n,i){Object(r.a)(this,e),this.regex=t,this.wordSeparators=n,this.simpleSearch=i};function h(e,t,n){if(!n)return new c.b(e,null);for(var r=[],i=0,o=t.length;i>0);t[i]>=e?r=i-1:t[i+1]>=e?(n=i,r=i):n=i+1}return n+1}}]),e}(),p=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"findMatches",value:function(e,t,n,r,i){var o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,n,new m(o.wordSeparators,o.regex),r,i):this._doFindMatchesLineByLine(e,n,o,r,i):[]}},{key:"_getMultilineMatchRange",value:function(e,t,n,r,i,o){var a,s,c=0;if(a=r?t+i+(c=r.findLineFeedCountBeforeOffset(i)):t+i,r){var u=r.findLineFeedCountBeforeOffset(i+o.length)-c;s=a+o.length+u}else s=a+o.length;var d=e.getPositionAt(a),h=e.getPositionAt(s);return new l.a(d.lineNumber,d.column,h.lineNumber,h.column)}},{key:"_doFindMatchesMultiline",value:function(e,t,n,r,i){var o,a=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new f(s):null,c=[],u=0;for(n.reset(0);o=n.next(s);)if(c[u++]=h(this._getMultilineMatchRange(e,a,s,l,o.index,o[0]),o,r),u>=i)return c;return c}},{key:"_doFindMatchesLineByLine",value:function(e,t,n,r,i){var o=[],a=0;if(t.startLineNumber===t.endLineNumber){var s=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(n,s,t.startLineNumber,t.startColumn-1,a,o,r,i),o}var l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,a,o,r,i);for(var c=t.startLineNumber+1;c=s))return i;return i}var _,b=new m(e.wordSeparators,e.regex);b.reset(0);do{if((_=b.next(t))&&(o[i++]=h(new l.a(n,_.index+1+r,n,_.index+1+_[0].length+r),_,a),i>=s))return i}while(_);return i}},{key:"findNextMatch",value:function(e,t,n,r){var i=t.parseSearchRequest();if(!i)return null;var o=new m(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindNextMatchMultiline(e,n,o,r):this._doFindNextMatchLineByLine(e,n,o,r)}},{key:"_doFindNextMatchMultiline",value:function(e,t,n,r){var i=new s.a(t.lineNumber,1),o=e.getOffsetAt(i),a=e.getLineCount(),c=e.getValueInRange(new l.a(i.lineNumber,i.column,a,e.getLineMaxColumn(a)),1),u="\r\n"===e.getEOL()?new f(c):null;n.reset(t.column-1);var d=n.next(c);return d?h(this._getMultilineMatchRange(e,o,c,u,d.index,d[0]),d,r):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new s.a(1,1),n,r):null}},{key:"_doFindNextMatchLineByLine",value:function(e,t,n,r){var i=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o),s=this._findFirstMatchInLine(n,a,o,t.column,r);if(s)return s;for(var l=1;l<=i;l++){var c=(o+l-1)%i,u=e.getLineContent(c+1),d=this._findFirstMatchInLine(n,u,c+1,1,r);if(d)return d}return null}},{key:"_findFirstMatchInLine",value:function(e,t,n,r,i){e.reset(r-1);var o=e.next(t);return o?h(new l.a(n,o.index+1,n,o.index+1+o[0].length),o,i):null}},{key:"findPreviousMatch",value:function(e,t,n,r){var i=t.parseSearchRequest();if(!i)return null;var o=new m(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindPreviousMatchMultiline(e,n,o,r):this._doFindPreviousMatchLineByLine(e,n,o,r)}},{key:"_doFindPreviousMatchMultiline",value:function(e,t,n,r){var i=this._doFindMatchesMultiline(e,new l.a(1,1,t.lineNumber,t.column),n,r,9990);if(i.length>0)return i[i.length-1];var o=e.getLineCount();return t.lineNumber!==o||t.column!==e.getLineMaxColumn(o)?this._doFindPreviousMatchMultiline(e,new s.a(o,e.getLineMaxColumn(o)),n,r):null}},{key:"_doFindPreviousMatchLineByLine",value:function(e,t,n,r){var i=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o).substring(0,t.column-1),s=this._findLastMatchInLine(n,a,o,r);if(s)return s;for(var l=1;l<=i;l++){var c=(i+o-l-1)%i,u=e.getLineContent(c+1),d=this._findLastMatchInLine(n,u,c+1,r);if(d)return d}return null}},{key:"_findLastMatchInLine",value:function(e,t,n,r){var i,o=null;for(e.reset(0);i=e.next(t);)o=h(new l.a(n,i.index+1,n,i.index+1+i[0].length),i,r);return o}}]),e}();function g(e,t,n,r,i){return function(e,t,n,r,i){if(0===r)return!0;var o=t.charCodeAt(r-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(i>0){var a=t.charCodeAt(r);if(0!==e.get(a))return!0}return!1}(e,t,0,r,i)&&function(e,t,n,r,i){if(r+i===n)return!0;var o=t.charCodeAt(r+i);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(i>0){var a=t.charCodeAt(r+i-1);if(0!==e.get(a))return!0}return!1}(e,t,n,r,i)}var m=function(){function e(t,n){Object(r.a)(this,e),this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return Object(i.a)(e,[{key:"reset",value:function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}},{key:"next",value:function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var r=t.index,i=t[0].length;if(r===this._prevMatchStartIndex&&i===this._prevMatchLength){if(0===i){o.A(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=i,!this._wordSeparators||g(this._wordSeparators,e,n,r,i))return t}while(t);return null}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return T})),n.d(t,"a",(function(){return N}));var r,i,o,a,s=n(22),l=n(0),c=n(1),u=n(4),d=n(5),h=n(2),f=n(33),p=n(9),g=n(49),m=n(35),v=n(19),_=n(8),b=function(){function e(){Object(l.a)(this,e)}return Object(c.a)(e,null,[{key:"columnSelect",value:function(e,t,n,r,i,o){for(var a=Math.abs(i-n)+1,s=n>i,l=r>o,c=ro)continue;if(br)continue;if(g1&&i--,e.columnSelect(t,n,r.fromViewLineNumber,r.fromViewVisualColumn,r.toViewLineNumber,i)}},{key:"columnSelectRight",value:function(e,t,n){for(var r=0,i=Math.min(n.fromViewLineNumber,n.toViewLineNumber),o=Math.max(n.fromViewLineNumber,n.toViewLineNumber),a=i;a<=o;a++){var s=t.getLineMaxColumn(a),l=m.a.visibleColumnFromColumn2(e,t,new v.a(a,s));r=Math.max(r,l)}var c=n.toViewVisualColumn;return c=0)&&(n.runDOMCommand(),!0)})),t.addImplementation(0,(function(e,t){var r=e.get(g.a).getActiveCodeEditor();return!!r&&(r.focus(),n.runEditorCommand(e,r,t),!0)}))};!function(e){var t=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._inSelectionMode=e.inSelectionMode,r}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[S.b.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}]),n}(O);e.MoveTo=Object(p.l)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Object(p.l)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));var n=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){e.model.pushStackElement();var n=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,n.viewStates.map((function(e){return m.d.fromViewState(e)}))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:n.fromLineNumber,fromViewVisualColumn:n.fromVisualColumn,toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),n.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}]),n}(O);e.ColumnSelect=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"columnSelect",precondition:void 0})}return Object(c.a)(n,[{key:"_getColumnSelectResult",value:function(e,t,n,r){var i=e.model.validatePosition(r.position),o=e.coordinatesConverter.validateViewPosition(new v.a(r.viewPosition.lineNumber,r.viewPosition.column),i),a=r.doColumnSelect?n.fromViewLineNumber:o.lineNumber,s=r.doColumnSelect?n.fromViewVisualColumn:r.mouseColumn-1;return b.columnSelect(e.cursorConfig,e,a,s,o.lineNumber,r.mouseColumn-1)}}]),n}(n))),e.CursorColumnSelectLeft=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3599,linux:{primary:0}}})}return Object(c.a)(n,[{key:"_getColumnSelectResult",value:function(e,t,n,r){return b.columnSelectLeft(e.cursorConfig,e,n)}}]),n}(n))),e.CursorColumnSelectRight=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3601,linux:{primary:0}}})}return Object(c.a)(n,[{key:"_getColumnSelectResult",value:function(e,t,n,r){return b.columnSelectRight(e.cursorConfig,e,n)}}]),n}(n)));var i=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._isPaged=e.isPaged,r}return Object(c.a)(n,[{key:"_getColumnSelectResult",value:function(e,t,n,r){return b.columnSelectUp(e.cursorConfig,e,n,this._isPaged)}}]),n}(n);e.CursorColumnSelectUp=Object(p.l)(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(p.l)(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3595,linux:{primary:0}}}));var a=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._isPaged=e.isPaged,r}return Object(c.a)(n,[{key:"_getColumnSelectResult",value:function(e,t,n,r){return b.columnSelectDown(e.cursorConfig,e,n,this._isPaged)}}]),n}(n);e.CursorColumnSelectDown=Object(p.l)(new a({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(p.l)(new a({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:3596,linux:{primary:0}}}));var s=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"cursorMove",precondition:void 0,description:S.a.description})}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){var n=S.a.parse(t);n&&this._runCursorMove(e,t.source,n)}},{key:"_runCursorMove",value:function(e,t,r){e.model.pushStackElement(),e.setCursorStates(t,3,n._move(e,e.getCursorStates(),r)),e.revealPrimaryCursor(t,!0)}}],[{key:"_move",value:function(e,t,n){var r=n.select,i=n.value;switch(n.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:return S.b.simpleMove(e,t,n.direction,r,i,n.unit);case 9:case 11:case 10:case 12:return S.b.viewportMove(e,t,n.direction,r,i);default:return null}}}]),n}(O);e.CursorMoveImpl=s,e.CursorMove=Object(p.l)(new s);var f=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._staticArgs=e.args,r}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){var n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,S.b.simpleMove(e,e.getCursorStates(),n.direction,n.select,n.value,n.unit)),e.revealPrimaryCursor(t.source,!0)}}]),n}(O);e.CursorLeft=Object(p.l)(new f({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(p.l)(new f({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1039}})),e.CursorRight=Object(p.l)(new f({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(p.l)(new f({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1041}})),e.CursorUp=Object(p.l)(new f({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(p.l)(new f({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(p.l)(new f({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(p.l)(new f({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1035}})),e.CursorDown=Object(p.l)(new f({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(p.l)(new f({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(p.l)(new f({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(p.l)(new f({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1036}})),e.CreateCursor=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"createCursor",precondition:void 0})}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){var n;n=t.wholeLine?S.b.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):S.b.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);var r=e.getCursorStates();if(r.length>1)for(var i=n.modelState?n.modelState.position:null,o=n.viewState?n.viewState.position:null,a=0,s=r.length;ai&&(r=i);var a=new _.a(r,1,r,e.model.getLineMaxColumn(r)),s=0;if(n.at)switch(n.at){case o.RawAtArgument.Top:s=3;break;case o.RawAtArgument.Center:s=1;break;case o.RawAtArgument.Bottom:s=4}var l=e.coordinatesConverter.convertModelRangeToViewRange(a);e.revealRange(t.source,!1,l,s,0)}}]),n}(O))),e.SelectAll=new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,p.h)}return Object(c.a)(n,[{key:"runDOMCommand",value:function(){document.execCommand("selectAll")}},{key:"runEditorCommand",value:function(e,t,n){var r=t._getViewModel();r&&this.runCoreEditorCommand(r,n)}},{key:"runCoreEditorCommand",value:function(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[S.b.selectAll(e,e.getPrimaryCursorState())])}}]),n}(x)),e.SetSelection=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"setSelection",precondition:void 0})}return Object(c.a)(n,[{key:"runCoreEditorCommand",value:function(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[m.d.fromModelSelection(t.selection)])}}]),n}(O)))}(T||(T={}));var N,D=E.a.and(k.a.textInputFocus,k.a.columnSelection);function L(e,t){w.a.registerKeybindingRule({id:e,primary:t,when:D,weight:1})}function A(e){return e.register(),e}L(T.CursorColumnSelectLeft.id,1039),L(T.CursorColumnSelectRight.id,1041),L(T.CursorColumnSelectUp.id,1040),L(T.CursorColumnSelectPageUp.id,1035),L(T.CursorColumnSelectDown.id,1042),L(T.CursorColumnSelectPageDown.id,1036),function(e){var t=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=t._getViewModel();r&&this.runCoreEditingCommand(t,r,n||{})}}]),n}(p.c);e.CoreEditingCommand=t,e.LineBreakInsert=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"lineBreakInsert",precondition:k.a.writable,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:0,mac:{primary:301}}})}return Object(c.a)(n,[{key:"runCoreEditingCommand",value:function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,C.a.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((function(e){return e.modelState.selection}))))}}]),n}(t))),e.Outdent=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"outdent",precondition:k.a.writable,kbOpts:{weight:0,kbExpr:E.a.and(k.a.editorTextFocus,k.a.tabDoesNotMoveFocus),primary:1026}})}return Object(c.a)(n,[{key:"runCoreEditingCommand",value:function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,C.a.outdent(t.cursorConfig,t.model,t.getCursorStates().map((function(e){return e.modelState.selection})))),e.pushUndoStop()}}]),n}(t))),e.Tab=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"tab",precondition:k.a.writable,kbOpts:{weight:0,kbExpr:E.a.and(k.a.editorTextFocus,k.a.tabDoesNotMoveFocus),primary:2}})}return Object(c.a)(n,[{key:"runCoreEditingCommand",value:function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,C.a.tab(t.cursorConfig,t.model,t.getCursorStates().map((function(e){return e.modelState.selection})))),e.pushUndoStop()}}]),n}(t))),e.DeleteLeft=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}return Object(c.a)(n,[{key:"runCoreEditingCommand",value:function(e,t,n){var r=y.a.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((function(e){return e.modelState.selection}))),i=Object(s.a)(r,2),o=i[0],a=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,a),t.setPrevEditOperationType(2)}}]),n}(t))),e.DeleteRight=Object(p.l)(new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,{id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:k.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}return Object(c.a)(n,[{key:"runCoreEditingCommand",value:function(e,t,n){var r=y.a.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((function(e){return e.modelState.selection}))),i=Object(s.a)(r,2),o=i[0],a=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,a),t.setPrevEditOperationType(3)}}]),n}(t))),e.Undo=new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,p.i)}return Object(c.a)(n,[{key:"runDOMCommand",value:function(){document.execCommand("undo")}},{key:"runEditorCommand",value:function(e,t,n){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().undo()}}]),n}(x)),e.Redo=new(function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(){return Object(l.a)(this,n),t.call(this,p.g)}return Object(c.a)(n,[{key:"runDOMCommand",value:function(){document.execCommand("redo")}},{key:"runEditorCommand",value:function(e,t,n){t.hasModel()&&!0!==t.getOption(72)&&t.getModel().redo()}}]),n}(x))}(N||(N={}));var I=function(e){Object(u.a)(n,e);var t=Object(d.a)(n);function n(e,r,i){var o;return Object(l.a)(this,n),(o=t.call(this,{id:e,precondition:void 0,description:i}))._handlerId=r,o}return Object(c.a)(n,[{key:"runCommand",value:function(e,t){var n=e.get(g.a).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)}}]),n}(p.a);function R(e,t){A(new I("default:"+e,e)),A(new I(e,e,t))}R("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),R("replacePreviousChar"),R("compositionStart"),R("compositionEnd"),R("paste"),R("cut")},function(e,t,n){"use strict";n.d(t,"a",(function(){return Fl})),n.d(t,"d",(function(){return Bl})),n.d(t,"b",(function(){return Ul})),n.d(t,"c",(function(){return Hl})),n.d(t,"e",(function(){return zl})),n.d(t,"f",(function(){return Vl})),n.d(t,"g",(function(){return Wl}));var r,i,o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y,S,C,k,E,w,O,T,x,N,D,L,A,I,R,M,P=n(43),j=n(0),F=n(1),B=n(41),U=n(12),H=n(58),z=n(39),V=n(19),W=n(8),G=n(34),q=n(133);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(r||(r={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(i||(i={})),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"}(o||(o={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(s||(s={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(l||(l={})),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"}(c||(c={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(u||(u={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(d||(d={})),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"}(h||(h={})),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"}(f||(f={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(p||(p={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(g||(g={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(m||(m={})),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"}(v||(v={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(_||(_={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(b||(b={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(y||(y={})),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"}(S||(S={})),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"}(C||(C={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(k||(k={})),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"}(E||(E={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(w||(w={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(O||(O={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(T||(T={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(x||(x={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(N||(N={})),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"}(D||(D={})),function(e){e[e.Deprecated=1]="Deprecated"}(L||(L={})),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"}(A||(A={})),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"}(I||(I={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(R||(R={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(M||(M={}));var K=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,null,[{key:"chord",value:function(e,t){return Object(H.a)(e,t)}}]),e}();function Y(){return{editor:void 0,languages:void 0,CancellationTokenSource:B.b,Emitter:U.a,KeyCode:v,KeyMod:K,Position:V.a,Range:W.a,Selection:G.a,SelectionDirection:x,MarkerSeverity:_,MarkerTag:b,Uri:z.a,Token:q.a}}K.CtrlCmd=2048,K.Shift=1024,K.Alt=512,K.WinCtrl=256;n(445);var $,Q=n(49),Z=n(6),X=n(14),J=n.n(X),ee=n(27),te=n(3),ne=n(99),re=n(231),ie=n(53),oe=n(61),ae=n(44),se=n(85);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}($||($={}));var le=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ce=function(e,t){return function(n,r){t(n,r,e)}},ue=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},de=function(){function e(t){Object(j.a)(this,e),this._commandService=t}return Object(F.a)(e,[{key:"open",value:function(e){return ue(this,void 0,void 0,J.a.mark((function t(){var n,r;return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Object(se.c)(e,ie.b.command)){t.next=2;break}return t.abrupt("return",!1);case 2:"string"===typeof e&&(e=z.a.parse(e)),r=[];try{r=Object(re.a)(decodeURIComponent(e.query))}catch(i){try{r=Object(re.a)(e.query)}catch(o){}}return Array.isArray(r)||(r=[r]),t.next=8,(n=this._commandService).executeCommand.apply(n,[e.path].concat(Object(ee.a)(r)));case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t,this)})))}}]),e}();de=le([ce(0,ae.b)],de);var he=function(){function e(t){Object(j.a)(this,e),this._editorService=t}return Object(F.a)(e,[{key:"open",value:function(e,t){return ue(this,void 0,void 0,J.a.mark((function n(){var r,i;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return"string"===typeof e&&(e=z.a.parse(e)),r=void 0,(i=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment))&&(r={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1},e=e.with({fragment:""})),e.scheme===ie.b.file&&(e=Object(oe.h)(e)),n.next=7,this._editorService.openCodeEditor({resource:e,options:{selection:r,context:(null===t||void 0===t?void 0:t.fromUserGesture)?$.USER:$.API}},this._editorService.getFocusedCodeEditor(),null===t||void 0===t?void 0:t.openToSide);case 7:return n.abrupt("return",!0);case 8:case"end":return n.stop()}}),n,this)})))}}]),e}();he=le([ce(0,Q.a)],he);var fe=function(){function e(t,n){var r=this;Object(j.a)(this,e),this._openers=new ne.a,this._validators=new ne.a,this._resolvers=new ne.a,this._externalOpener={openExternal:function(e){return Object(se.c)(e,ie.b.http)||Object(se.c)(e,ie.b.https)?te.windowOpenNoOpener(e):window.location.href=e,Promise.resolve(!0)}},this._openers.push({open:function(e,t){return ue(r,void 0,void 0,J.a.mark((function n(){return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!((null===t||void 0===t?void 0:t.openExternal)||Object(se.c)(e,ie.b.mailto)||Object(se.c)(e,ie.b.http)||Object(se.c)(e,ie.b.https))){n.next=4;break}return n.next=3,this._doOpenExternal(e,t);case 3:return n.abrupt("return",!0);case 4:return n.abrupt("return",!1);case 5:case"end":return n.stop()}}),n,this)})))}}),this._openers.push(new de(n)),this._openers.push(new he(t))}return Object(F.a)(e,[{key:"open",value:function(e,t){return ue(this,void 0,void 0,J.a.mark((function n(){var r,i,o,a,s,l;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=Object(Z.a)(this._validators.toArray()),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}return o=i.value,n.next=7,o.shouldOpen(e);case 7:if(n.sent){n.next=9;break}return n.abrupt("return",!1);case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:a=Object(Z.a)(this._openers.toArray()),n.prev=20,a.s();case 22:if((s=a.n()).done){n.next=31;break}return l=s.value,n.next=26,l.open(e,t);case 26:if(!n.sent){n.next=29;break}return n.abrupt("return",!0);case 29:n.next=22;break;case 31:n.next=36;break;case 33:n.prev=33,n.t1=n.catch(20),a.e(n.t1);case 36:return n.prev=36,a.f(),n.finish(36);case 39:return n.abrupt("return",!1);case 40:case"end":return n.stop()}}),n,this,[[1,13,16,19],[20,33,36,39]])})))}},{key:"resolveExternalUri",value:function(e,t){return ue(this,void 0,void 0,J.a.mark((function n(){var r,i,o,a;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=Object(Z.a)(this._resolvers.toArray()),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=12;break}return o=i.value,n.next=7,o.resolveExternalUri(e,t);case 7:if(!(a=n.sent)){n.next=10;break}return n.abrupt("return",a);case 10:n.next=3;break;case 12:n.next=17;break;case 14:n.prev=14,n.t0=n.catch(1),r.e(n.t0);case 17:return n.prev=17,r.f(),n.finish(17);case 20:return n.abrupt("return",{resolved:e,dispose:function(){}});case 21:case"end":return n.stop()}}),n,this,[[1,14,17,20]])})))}},{key:"_doOpenExternal",value:function(e,t){return ue(this,void 0,void 0,J.a.mark((function n(){var r,i,o;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r="string"===typeof e?z.a.parse(e):e,n.next=3,this.resolveExternalUri(r,t);case 3:if(i=n.sent,o=i.resolved,"string"!==typeof e||r.toString()!==o.toString()){n.next=9;break}return n.abrupt("return",this._externalOpener.openExternal(e));case 9:return n.abrupt("return",this._externalOpener.openExternal(encodeURI(o.toString(!0))));case 10:case"end":return n.stop()}}),n,this)})))}},{key:"dispose",value:function(){this._validators.clear()}}]),e}();fe=le([ce(0,Q.a),ce(1,ae.b)],fe);var pe=n(305),ge=n(188),me=n(158),ve=n(67),_e=n(20),be=n(94),ye=n(102),Se=n(130),Ce=n(4),ke=n(5),Ee=n(17),we=n(16),Oe=n(32),Te=n(7),xe=n(25),Ne=n(21),De=n(33),Le="$initialize",Ae=!1;function Ie(e){Ne.h&&(Ae||(Ae=!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))}var Re=function(){function e(t){Object(j.a)(this,e),this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return Object(F.a)(e,[{key:"setWorkerId",value:function(e){this._workerId=e}},{key:"sendMessage",value:function(e,t){var n=this,r=String(++this._lastSentReq);return new Promise((function(i,o){n._pendingReplies[r]={resolve:i,reject:o},n._send({vsWorker:n._workerId,req:r,method:e,args:t})}))}},{key:"handleMessage",value:function(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}},{key:"_handleMessage",value:function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var r=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){var i=n.err;return n.err.$isError&&((i=new Error).name=n.err.name,i.message=n.err.message,i.stack=n.err.stack),void r.reject(i)}r.resolve(n.res)}else{var o=e,a=o.req;this._handler.handleMessage(o.method,o.args).then((function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})}),(function(e){e.detail instanceof Error&&(e.detail=Object(xe.g)(e.detail)),t._send({vsWorker:t._workerId,seq:a,res:void 0,err:Object(xe.g)(e)})}))}}},{key:"_send",value:function(e){var t=[];if(e.req)for(var n=e,r=0;r0||this.m_modifiedCount>0)&&this.m_changes.push(new ze(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}},{key:"AddOriginalElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}},{key:"AddModifiedElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}},{key:"getChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}},{key:"getReverseChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}]),e}(),$e=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(j.a)(this,e),this.ContinueProcessingPredicate=r;var i=e._getElements(t),o=Object(He.a)(i,3),a=o[0],s=o[1],l=o[2],c=e._getElements(n),u=Object(He.a)(c,3),d=u[0],h=u[1],f=u[2];this._hasStrings=l&&f,this._originalStringElements=a,this._originalElementsOrHash=s,this._modifiedStringElements=d,this._modifiedElementsOrHash=h,this.m_forwardHistory=[],this.m_reverseHistory=[]}return Object(F.a)(e,[{key:"ElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}},{key:"OriginalElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}},{key:"ModifiedElementsAreEqual",value:function(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}},{key:"ComputeDiff",value:function(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}},{key:"_ComputeDiff",value:function(e,t,n,r,i){var o=[!1],a=this.ComputeDiffRecursive(e,t,n,r,o);return i&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}},{key:"ComputeDiffRecursive",value:function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;var o;if(e>t||n>r)return n<=r?(qe.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new ze(e,0,n,r-n+1)]):e<=t?(qe.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new ze(e,t-e+1,n,0)]):(qe.Assert(e===t+1,"originalStart should only be one more than originalEnd"),qe.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o;var a=[0],s=[0],l=this.ComputeRecursionPoint(e,t,n,r,a,s,i),c=a[0],u=s[0];if(null!==l)return l;if(!i[0]){var d=this.ComputeDiffRecursive(e,c,n,u,i),h=[];return h=i[0]?[new ze(c+1,t-(c+1)+1,u+1,r-(u+1)+1)]:this.ComputeDiffRecursive(c+1,t,u+1,r,i),this.ConcatenateChanges(d,h)}return[new ze(e,t-e+1,n,r-n+1)]}},{key:"WALKTRACE",value:function(e,t,n,r,i,o,a,s,l,c,u,d,h,f,p,g,m,v){var _,b=null,y=new Ye,S=t,C=n,k=h[0]-g[0]-r,E=-1073741824,w=this.m_forwardHistory.length-1;do{var O=k+e;O===S||O=0&&(e=(l=this.m_forwardHistory[w])[0],S=1,C=l.length-1)}while(--w>=-1);if(_=y.getReverseChanges(),v[0]){var T=h[0]+1,x=g[0]+1;if(null!==_&&_.length>0){var N=_[_.length-1];T=Math.max(T,N.getOriginalEnd()),x=Math.max(x,N.getModifiedEnd())}b=[new ze(T,d-T+1,x,p-x+1)]}else{y=new Ye,S=o,C=a,k=h[0]-g[0]-s,E=1073741824,w=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var D=k+i;D===S||D=c[D+1]?(f=(u=c[D+1]-1)-k-s,u>E&&y.MarkNextChange(),E=u+1,y.AddOriginalElement(u+1,f+1),k=D+1-i):(f=(u=c[D-1])-k-s,u>E&&y.MarkNextChange(),E=u,y.AddModifiedElement(u+1,f+1),k=D-1-i),w>=0&&(i=(c=this.m_reverseHistory[w])[0],S=1,C=c.length-1)}while(--w>=-1);b=y.getChanges()}return this.ConcatenateChanges(_,b)}},{key:"ComputeRecursionPoint",value:function(e,t,n,r,i,o,a){var s=0,l=0,c=0,u=0,d=0,h=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var f=t-e+(r-n),p=f+1,g=new Int32Array(p),m=new Int32Array(p),v=r-n,_=t-e,b=e-n,y=t-r,S=(_-v)%2===0;g[v]=e,m[_]=t,a[0]=!1;for(var C=1;C<=f/2+1;C++){var k=0,E=0;c=this.ClipDiagonalBound(v-C,C,v,p),u=this.ClipDiagonalBound(v+C,C,v,p);for(var w=c;w<=u;w+=2){l=(s=w===c||wk+E&&(k=s,E=l),!S&&Math.abs(w-_)<=C-1&&s>=m[w])return i[0]=s,o[0]=l,O<=m[w]&&C<=1448?this.WALKTRACE(v,c,u,b,_,d,h,y,g,m,s,t,i,l,r,o,S,a):null}var T=(k-e+(E-n)-C)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(k,T))return a[0]=!0,i[0]=k,o[0]=E,T>0&&C<=1448?this.WALKTRACE(v,c,u,b,_,d,h,y,g,m,s,t,i,l,r,o,S,a):(e++,n++,[new ze(e,t-e+1,n,r-n+1)]);d=this.ClipDiagonalBound(_-C,C,_,p),h=this.ClipDiagonalBound(_+C,C,_,p);for(var x=d;x<=h;x+=2){l=(s=x===d||x=m[x+1]?m[x+1]-1:m[x-1])-(x-_)-y;for(var N=s;s>e&&l>n&&this.ElementsAreEqual(s,l);)s--,l--;if(m[x]=s,S&&Math.abs(x-v)<=C&&s<=g[x])return i[0]=s,o[0]=l,N>=g[x]&&C<=1448?this.WALKTRACE(v,c,u,b,_,d,h,y,g,m,s,t,i,l,r,o,S,a):null}if(C<=1447){var D=new Int32Array(u-c+2);D[0]=v-c+1,Ke.Copy2(g,c,D,1,u-c+1),this.m_forwardHistory.push(D),(D=new Int32Array(h-d+2))[0]=_-d+1,Ke.Copy2(m,d,D,1,h-d+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(v,c,u,b,_,d,h,y,g,m,s,t,i,l,r,o,S,a)}},{key:"PrettifyChanges",value:function(e){for(var t=0;t0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;l--){var c=e[l],u=0,d=0;if(l>0){var h=e[l-1];h.originalLength>0&&(u=h.originalStart+h.originalLength),h.modifiedLength>0&&(d=h.modifiedStart+h.modifiedLength)}for(var f=c.originalLength>0,p=c.modifiedLength>0,g=0,m=this._boundaryScore(c.originalStart,c.originalLength,c.modifiedStart,c.modifiedLength),v=1;;v++){var _=c.originalStart-v,b=c.modifiedStart-v;if(_m&&(m=y,g=v)}c.originalStart-=g,c.modifiedStart-=g}return e}},{key:"_OriginalIsBoundary",value:function(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}},{key:"_OriginalRegionIsBoundary",value:function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}},{key:"_ModifiedIsBoundary",value:function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}},{key:"_ModifiedRegionIsBoundary",value:function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}},{key:"_boundaryScore",value:function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}},{key:"ConcatenateChanges",value:function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return Ke.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],Ke.Copy(t,1,r,e.length,t.length-1),r}var i=new Array(e.length+t.length);return Ke.Copy(e,0,i,0,e.length),Ke.Copy(t,0,i,e.length,t.length),i}},{key:"ChangesOverlap",value:function(e,t,n){if(qe.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),qe.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){var r=e.originalStart,i=e.originalLength,o=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new ze(r,i,o,a),!0}return n[0]=null,!1}},{key:"ClipDiagonalBound",value:function(e,t,n,r){if(e>=0&&e0&&"string"===typeof e[0]}},{key:"_getElements",value:function(t){var n=t.getElements();if(e._isStringArray(n)){for(var r=new Int32Array(n.length),i=0,o=n.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&o()){var f=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),p=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),g=Ze(f,p,o,!0).changes;s&&(g=function(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r1&&v>1;){if(p.charCodeAt(m-2)!==g.charCodeAt(v-2))break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(a,s+1,1,m,l+1,1,v);for(var _=it(p,1),b=it(g,1),y=p.length+1,S=g.length+1;_n&&(n=l),s>r&&(r=s),c>r&&(r=c)}n++,r++;for(var u=new ut(r,n,0),d=0,h=t.length;d=this._maxCharCode?0:this._states.get(e,t)}}]),e}(),ht=null;function ft(){return null===ht&&(ht=new dt([[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]])),ht}var pt=null;function gt(){if(null===pt){pt=new ct.a(0);for(var e=" \t<>'\"\u3001\u3002\uff61\uff64\uff0c\uff0e\uff1a\uff1b\u2018\u201c\u3008\u300a\u300c\u300e\u3010\u3014\uff08\uff3b\uff5b\uff62\uff63\uff5d\uff3d\uff09\u3015\u3011\u300f\u300d\u300b\u3009\u201d\u2019\uff40\uff5e\u2026",t=0;tr);if(r>0){var s=t.charCodeAt(r-1),l=t.charCodeAt(o);(40===s&&41===l||91===s&&93===l||123===s&&125===l)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}}},{key:"computeLinks",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft(),r=gt(),i=[],o=1,a=t.getLineCount();o<=a;o++){for(var s=t.getLineContent(o),l=s.length,c=0,u=0,d=0,h=1,f=!1,p=!1,g=!1,m=!1;c=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null}}]),e}();_t.INSTANCE=new _t;var bt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},yt=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){return Object(j.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"getValue",value:function(){return this.getText()}},{key:"getLinesContent",value:function(){return this._lines.slice(0)}},{key:"getLineCount",value:function(){return this._lines.length}},{key:"getLineContent",value:function(e){return this._lines[e-1]}},{key:"getWordAtPosition",value:function(e,t){var n=Object(lt.d)(e.column,Object(lt.c)(t),this._lines[e.lineNumber-1],0);return n?new W.a(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}},{key:"words",value:function(e){var t=this._lines,n=this._wordenize.bind(this),r=0,i="",o=0,a=[];return Object(Be.a)({},Symbol.iterator,J.a.mark((function s(){var l;return J.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!(othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e}},{key:"uri",get:function(){return this._uri}},{key:"version",get:function(){return this._versionId}},{key:"eol",get:function(){return this._eol}}]),n}(st),St=function(){function e(t,n){Object(j.a)(this,e),this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}return Object(F.a)(e,[{key:"dispose",value:function(){this._models=Object.create(null)}},{key:"_getModel",value:function(e){return this._models[e]}},{key:"_getModels",value:function(){var e=this,t=[];return Object.keys(this._models).forEach((function(n){return t.push(e._models[n])})),t}},{key:"acceptNewModel",value:function(e){this._models[e.url]=new yt(z.a.parse(e.url),e.lines,e.EOL,e.versionId)}},{key:"acceptModelChanged",value:function(e,t){this._models[e]&&this._models[e].onEvents(t)}},{key:"acceptRemovedModel",value:function(e){this._models[e]&&delete this._models[e]}},{key:"computeDiff",value:function(e,t,n,r){return bt(this,void 0,void 0,J.a.mark((function i(){var o,a,s,l,c,u,d;return J.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e),a=this._getModel(t),o&&a){i.next=4;break}return i.abrupt("return",null);case 4:return s=o.getLinesContent(),l=a.getLinesContent(),c=new nt(s,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:r}),u=c.computeDiff(),d=!(u.changes.length>0)&&this._modelsAreIdentical(o,a),i.abrupt("return",{quitEarly:u.quitEarly,identical:d,changes:u.changes});case 10:case"end":return i.stop()}}),i,this)})))}},{key:"_modelsAreIdentical",value:function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var r=1;r<=n;r++){if(e.getLineContent(r)!==t.getLineContent(r))return!1}return!0}},{key:"computeMoreMinimalEdits",value:function(t,n){return bt(this,void 0,void 0,J.a.mark((function r(){var i,o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y,S;return J.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this._getModel(t)){r.next=3;break}return r.abrupt("return",n);case 3:o=[],a=void 0,n=Object(Ue.p)(n,(function(e,t){return e.range&&t.range?W.a.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)})),s=Object(Z.a)(n),r.prev=7,s.s();case 9:if((l=s.n()).done){r.next=27;break}if(c=l.value,u=c.range,d=c.text,"number"===typeof(h=c.eol)&&(a=h),!W.a.isEmpty(u)||d){r.next=14;break}return r.abrupt("continue",25);case 14:if(f=i.getValueInRange(u),d=d.replace(/\r\n|\n|\r/g,i.eol),f!==d){r.next=18;break}return r.abrupt("continue",25);case 18:if(!(Math.max(d.length,f.length)>e._diffLimit)){r.next=21;break}return o.push({range:u,text:d}),r.abrupt("continue",25);case 21:p=Ge(f,d,!1),g=i.offsetAt(W.a.lift(u).getStartPosition()),m=Object(Z.a)(p);try{for(m.s();!(v=m.n()).done;)_=v.value,b=i.positionAt(g+_.originalStart),y=i.positionAt(g+_.originalStart+_.originalLength),S={text:d.substr(_.modifiedStart,_.modifiedLength),range:{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:y.lineNumber,endColumn:y.column}},i.getValueInRange(S.range)!==S.text&&o.push(S)}catch(C){m.e(C)}finally{m.f()}case 25:r.next=9;break;case 27:r.next=32;break;case 29:r.prev=29,r.t0=r.catch(7),s.e(r.t0);case 32:return r.prev=32,s.f(),r.finish(32);case 35:return"number"===typeof a&&o.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r.abrupt("return",o);case 37:case"end":return r.stop()}}),r,this,[[7,29,32,35]])})))}},{key:"computeLinks",value:function(e){return bt(this,void 0,void 0,J.a.mark((function t(){var n;return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._getModel(e)){t.next=3;break}return t.abrupt("return",null);case 3:return t.abrupt("return",vt(n));case 4:case"end":return t.stop()}}),t,this)})))}},{key:"textualSuggest",value:function(t,n,r,i){return bt(this,void 0,void 0,J.a.mark((function o(){var a,s,l,c,u,d,h,f;return J.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=this._getModel(t)){o.next=3;break}return o.abrupt("return",null);case 3:s=[],l=new Set,c=new RegExp(r,i),(u=a.getWordAtPosition(n,c))&&l.add(a.getValueInRange(u)),d=Object(Z.a)(a.words(c)),o.prev=9,d.s();case 11:if((h=d.n()).done){o.next=23;break}if(f=h.value,!l.has(f)){o.next=15;break}return o.abrupt("continue",21);case 15:if(l.add(f),isNaN(Number(f))){o.next=18;break}return o.abrupt("continue",21);case 18:if(s.push(f),!(l.size>e._suggestionsLimit)){o.next=21;break}return o.abrupt("break",23);case 21:o.next=11;break;case 23:o.next=28;break;case 25:o.prev=25,o.t0=o.catch(9),d.e(o.t0);case 28:return o.prev=28,d.f(),o.finish(28);case 31:return o.abrupt("return",s);case 32:case"end":return o.stop()}}),o,this,[[9,25,28,31]])})))}},{key:"computeWordRanges",value:function(e,t,n,r){return bt(this,void 0,void 0,J.a.mark((function i(){var o,a,s,l,c,u,d,h,f;return J.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getModel(e)){i.next=3;break}return i.abrupt("return",Object.create(null));case 3:a=new RegExp(n,r),s=Object.create(null),l=t.startLineNumber;case 6:if(!(l=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Tt=function(e,t){return function(n,r){t(n,r,e)}},xt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Nt=3e5;function Dt(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}var Lt=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i){var o;return Object(j.a)(this,n),(o=t.call(this))._modelService=e,o._workerManager=o._register(new It(o._modelService)),o._logService=i,o._register(_e.s.register("*",{provideLinks:function(e,t){return Dt(o._modelService,e.uri)?o._workerManager.withWorker().then((function(t){return t.computeLinks(e.uri)})).then((function(e){return e&&{links:e}})):Promise.resolve({links:[]})}})),o._register(_e.d.register("*",new At(o._workerManager,r,o._modelService))),o}return Object(F.a)(n,[{key:"dispose",value:function(){Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}},{key:"canComputeDiff",value:function(e,t){return Dt(this._modelService,e)&&Dt(this._modelService,t)}},{key:"computeDiff",value:function(e,t,n,r){return this._workerManager.withWorker().then((function(i){return i.computeDiff(e,t,n,r)}))}},{key:"computeMoreMinimalEdits",value:function(e,t){var n=this;if(Object(Ue.o)(t)){if(!Dt(this._modelService,e))return Promise.resolve(t);var r=wt.a.create(!0),i=this._workerManager.withWorker().then((function(n){return n.computeMoreMinimalEdits(e,t)}));return i.finally((function(){return n._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),r.elapsed())})),i}return Promise.resolve(void 0)}},{key:"canNavigateValueSet",value:function(e){return Dt(this._modelService,e)}},{key:"navigateValueSet",value:function(e,t,n){return this._workerManager.withWorker().then((function(r){return r.navigateValueSet(e,t,n)}))}},{key:"canComputeWordRanges",value:function(e){return Dt(this._modelService,e)}},{key:"computeWordRanges",value:function(e,t){return this._workerManager.withWorker().then((function(n){return n.computeWordRanges(e,t)}))}}]),n}(Te.a);Lt=Ot([Tt(0,Ct.a),Tt(1,kt.a),Tt(2,Et.b)],Lt);var At=function(){function e(t,n,r){Object(j.a)(this,e),this._debugDisplayName="wordbasedCompletions",this._workerManager=t,this._configurationService=n,this._modelService=r}return Object(F.a)(e,[{key:"provideCompletionItems",value:function(e,t){return xt(this,void 0,void 0,J.a.mark((function n(){var r,i,o,a,s,l;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=this._configurationService.getValue(e.uri,t,"editor"),r.wordBasedSuggestions){n.next=3;break}return n.abrupt("return",void 0);case 3:if(Dt(this._modelService,e.uri)){n.next=5;break}return n.abrupt("return",void 0);case 5:return i=e.getWordAtPosition(t),o=i?new W.a(t.lineNumber,i.startColumn,t.lineNumber,i.endColumn):W.a.fromPositions(t),a=o.setEndPosition(t.lineNumber,t.column),n.next=10,this._workerManager.withWorker();case 10:return s=n.sent,n.next=13,s.textualSuggest(e.uri,t);case 13:if(l=n.sent){n.next=16;break}return n.abrupt("return",void 0);case 16:return n.abrupt("return",{suggestions:l.map((function(e){return{kind:18,label:e,insertText:e,range:{insert:a,replace:o}}}))});case 17:case"end":return n.stop()}}),n,this)})))}}]),e}(),It=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this))._modelService=e,r._editorWorkerClient=null,r._lastWorkerUsedTime=(new Date).getTime(),r._register(new Oe.c).cancelAndSet((function(){return r._checkStopIdleWorker()}),Math.round(15e4)),r._register(r._modelService.onModelRemoved((function(e){return r._checkStopEmptyWorker()}))),r}return Object(F.a)(n,[{key:"dispose",value:function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}},{key:"_checkStopEmptyWorker",value:function(){this._editorWorkerClient&&(0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null))}},{key:"_checkStopIdleWorker",value:function(){this._editorWorkerClient&&((new Date).getTime()-this._lastWorkerUsedTime>Nt&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null))}},{key:"withWorker",value:function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new jt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}]),n}(Te.a),Rt=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i){var o;if(Object(j.a)(this,n),(o=t.call(this))._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=e,o._modelService=r,!i){var a=new Oe.c;a.cancelAndSet((function(){return o._checkStopModelSync()}),Math.round(3e4)),o._register(a)}return o}return Object(F.a)(n,[{key:"dispose",value:function(){for(var e in this._syncedModels)Object(Te.f)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}},{key:"ensureSyncedResources",value:function(e){var t,n=Object(Z.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.toString();this._syncedModels[i]||this._beginModelSync(r),this._syncedModels[i]&&(this._syncedModelsLastUsedTime[i]=(new Date).getTime())}}catch(o){n.e(o)}finally{n.f()}}},{key:"_checkStopModelSync",value:function(){var e=(new Date).getTime(),t=[];for(var n in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[n]>6e4&&t.push(n)}for(var r=0,i=t;r'"_]/g,"-")}function Yt(e,t){return new Error("".concat(e.languageId,": ").concat(t))}function $t(e,t,n,r,i){var o=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,a,s,l,c,u,d,h,f){return Gt(s)?Gt(l)?!Gt(c)&&c0;){var r=e.tokenizer[n];if(r)return r;var i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return null}var Zt=function(){function e(t){Object(j.a)(this,e),this._maxCacheDepth=t,this._entries=Object.create(null)}return Object(F.a)(e,[{key:"create",value:function(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Xt(e,t);var n=Xt.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var r=this._entries[n];return r||(r=new Xt(e,t),this._entries[n]=r,r)}}],[{key:"create",value:function(e,t){return this._INSTANCE.create(e,t)}}]),e}();Zt._INSTANCE=new Zt(5);var Xt=function(){function e(t,n){Object(j.a)(this,e),this.parent=t,this.state=n,this.depth=(this.parent?this.parent.depth:0)+1}return Object(F.a)(e,[{key:"equals",value:function(t){return e._equals(this,t)}},{key:"push",value:function(e){return Zt.create(this,e)}},{key:"pop",value:function(){return this.parent}},{key:"popall",value:function(){for(var e=this;e.parent;)e=e.parent;return e}},{key:"switchTo",value:function(e){return Zt.create(this.parent,e)}}],[{key:"getStackElementId",value:function(e){for(var t="";null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}},{key:"_equals",value:function(e,t){for(;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}}]),e}(),Jt=function(){function e(t,n){Object(j.a)(this,e),this.modeId=t,this.state=n}return Object(F.a)(e,[{key:"equals",value:function(e){return this.modeId===e.modeId&&this.state.equals(e.state)}},{key:"clone",value:function(){return this.state.clone()===this.state?this:new e(this.modeId,this.state)}}]),e}(),en=function(){function e(t){Object(j.a)(this,e),this._maxCacheDepth=t,this._entries=Object.create(null)}return Object(F.a)(e,[{key:"create",value:function(e,t){if(null!==t)return new tn(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new tn(e,t);var n=Xt.getStackElementId(e),r=this._entries[n];return r||(r=new tn(e,null),this._entries[n]=r,r)}}],[{key:"create",value:function(e,t){return this._INSTANCE.create(e,t)}}]),e}();en._INSTANCE=new en(5);var tn=function(){function e(t,n){Object(j.a)(this,e),this.stack=t,this.embeddedModeData=n}return Object(F.a)(e,[{key:"clone",value:function(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:en.create(this.stack,this.embeddedModeData)}},{key:"equals",value:function(t){return t instanceof e&&(!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData)))}}]),e}(),nn=function(){function e(){Object(j.a)(this,e),this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return Object(F.a)(e,[{key:"enterMode",value:function(e,t){this._language=t}},{key:"emit",value:function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new q.a(e,t,this._language)))}},{key:"nestedModeTokenize",value:function(e,t,n){var r=t.modeId,i=t.state,o=_e.C.get(r);if(!o)return this.enterMode(n,r),this.emit(n,""),i;var a=o.tokenize(e,i,n);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}},{key:"finalize",value:function(e){return new q.b(this._tokens,e)}}]),e}(),rn=function(){function e(t,n){Object(j.a)(this,e),this._modeService=t,this._theme=n,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return Object(F.a)(e,[{key:"enterMode",value:function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}},{key:"emit",value:function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))}},{key:"nestedModeTokenize",value:function(t,n,r){var i=n.modeId,o=n.state,a=_e.C.get(i);if(!a)return this.enterMode(r,i),this.emit(r,""),o;var s=a.tokenize2(t,o,r);return this._prependTokens=e._merge(this._prependTokens,this._tokens,s.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,s.endState}},{key:"finalize",value:function(t){return new q.c(e._merge(this._prependTokens,this._tokens,null),t)}}],[{key:"_merge",value:function(e,t,n){var r=null!==e?e.length:0,i=t.length,o=null!==n?n.length:0;if(0===r&&0===i&&0===o)return new Uint32Array(0);if(0===r&&0===i)return n;if(0===i&&0===o)return e;var a=new Uint32Array(r+i+o);null!==e&&a.set(e);for(var s=0;s0&&r.nestedModeTokenize(a,t.embeddedModeData,n);var s=e.substring(i);return this._myTokenize(s,t,n+i,r)}},{key:"_safeRuleName",value:function(e){return e?e.name:"(unknown)"}},{key:"_myTokenize",value:function(e,t,n,r){var i=this;r.enterMode(n,this._modeId);for(var o,a,s=e.length,l=t.embeddedModeData,c=t.stack,u=0,d=null,h=!0;h||u=s)break;h=!1;var k=this._lexer.tokenizer[m];if(!k&&!(k=Qt(this._lexer,m)))throw Yt(this._lexer,"tokenizer state is not defined: "+m);var E,w=e.substr(u),O=Object(Z.a)(k);try{for(O.s();!(E=O.n()).done;){var T=E.value;if((0===u||!T.matchOnlyAtLineStart)&&(v=w.match(T.regex))){_=v[0],b=T.action;break}}}catch(F){O.e(F)}finally{O.f()}}if(v||(v=[""],_=""),b||(u=this._lexer.maxStack)throw Yt(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(m)}else if("@pop"===b.next){if(c.depth<=1)throw Yt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(y));c=c.pop()}else if("@popall"===b.next)c=c.popall();else{var D=$t(this._lexer,b.next,_,v,m);if("@"===D[0]&&(D=D.substr(1)),!Qt(this._lexer,D))throw Yt(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(y));c=c.push(D)}}b.log&&"string"===typeof b.log&&(o=this._lexer,a=this._lexer.languageId+": "+$t(this._lexer,b.log,_,v,m),console.log("".concat(o.languageId,": ").concat(a)))}if(null===x)throw Yt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(y));var L=function(t){var o=i._modeService.getModeIdForLanguageName(t);o&&(t=o);var a=i._getNestedEmbeddedModeData(t);if(u0)throw Yt(this._lexer,"groups cannot be nested: "+this._safeRuleName(y));if(v.length!==x.length+1)throw Yt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(y));for(var A=0,I=1;I=0&&s()}))})}},{key:"colorizeLine",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,o=Ht.d.isBasicASCII(e,t),a=Ht.d.containsRTL(e,o,n),s=Object(Ut.e)(new Ut.c(!1,!0,e,!1,o,a,0,r,[],i,0,0,0,0,-1,"none",!1,!1,null));return s.html}},{key:"colorizeModelLine",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=e.getLineContent(t);e.forceTokenization(t);var i=e.getLineTokens(t),o=i.inflate();return this.colorizeLine(r,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)}}]),e}();function ln(e,t,n){return new Promise((function(r,i){!function o(){var a=function(e,t,n){for(var r=[],i=n.getInitialState(),o=0,a=e.length;o"),i=l.endState}return r.join("")}(e,t,n);if(n instanceof on){var s=n.getLoadStatus();if(!1===s.loaded)return void s.promise.then(o,i)}r(a)}()}))}function cn(e,t){var n=[],r=new Uint32Array(2);r[0]=0,r[1]=16793600;for(var i=0,o=e.length;i")}return n.join("")}var un=n(75),dn=n(76),hn=n(118),fn=n(165),pn=n(189),gn=n(78),mn=n(62),vn=n(84),_n=n(54),bn=n(140),yn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object(j.a)(this,e),this._contents=t,this._keys=n,this._overrides=r,this.isFrozen=!1}return Object(F.a)(e,[{key:"isEmpty",value:function(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}},{key:"getValue",value:function(e){return e?Object(mn.d)(this.contents,e):this.contents}},{key:"override",value:function(t){var n=this.getContentsForOverrideIdentifer(t);if(!n||"object"!==typeof n||!Object.keys(n).length)return this;var r,i={},o=Object(Z.a)(Ue.e([].concat(Object(ee.a)(Object.keys(this.contents)),Object(ee.a)(Object.keys(n)))));try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.contents[a],l=n[a];l&&("object"===typeof s&&"object"===typeof l?(s=_n.c(s),this.mergeContents(s,l)):s=l),i[a]=s}}catch(c){o.e(c)}finally{o.f()}return new e(i,this.keys,this.overrides)}},{key:"merge",value:function(){for(var t=this,n=_n.c(this.contents),r=_n.c(this.overrides),i=Object(ee.a)(this.keys),o=arguments.length,a=new Array(o),s=0;s2&&void 0!==arguments[2]?arguments[2]:new yn,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new yn,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new vn.b,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new yn,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new vn.b,l=!(arguments.length>7&&void 0!==arguments[7])||arguments[7];Object(j.a)(this,e),this._defaultConfiguration=t,this._localUserConfiguration=n,this._remoteUserConfiguration=r,this._workspaceConfiguration=i,this._folderConfigurations=o,this._memoryConfiguration=a,this._memoryConfigurationByResource=s,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new vn.b,this._userConfiguration=null}return Object(F.a)(e,[{key:"getValue",value:function(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)}},{key:"updateValue",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.resource?(n=this._memoryConfigurationByResource.get(r.resource))||(n=new yn,this._memoryConfigurationByResource.set(r.resource,n)):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),r.resource||(this._workspaceConsolidatedConfiguration=null)}},{key:"getConsolidateConfigurationModel",value:function(e,t){var n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}},{key:"getConsolidatedConfigurationModelForResource",value:function(e,t){var n=e.resource,r=this.getWorkspaceConsolidatedConfiguration();if(t&&n){var i=t.getFolder(n);i&&(r=this.getFolderConsolidatedConfiguration(i.uri)||r);var o=this._memoryConfigurationByResource.get(n);o&&(r=r.merge(o))}return r}},{key:"getWorkspaceConsolidatedConfiguration",value:function(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}},{key:"getFolderConsolidatedConfiguration",value:function(e){var t=this._foldersConsolidatedConfigurations.get(e);if(!t){var n=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(t=n.merge(r),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}},{key:"toData",value:function(){var e=this;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:Object(ee.a)(this._folderConfigurations.keys()).reduce((function(t,n){var r=e._folderConfigurations.get(n),i=r.contents,o=r.overrides,a=r.keys;return t.push([n,{contents:i,overrides:o,keys:a}]),t}),[])}}},{key:"userConfiguration",get:function(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}}],[{key:"parse",value:function(t){var n=this,r=this.parseConfigurationModel(t.defaults),i=this.parseConfigurationModel(t.user),o=this.parseConfigurationModel(t.workspace),a=t.folders.reduce((function(e,t){return e.set(z.a.revive(t[0]),n.parseConfigurationModel(t[1])),e}),new vn.b);return new e(r,i,new yn,o,a,new yn,new vn.b,!1)}},{key:"parseConfigurationModel",value:function(e){return new yn(e.contents,e.keys,e.overrides).freeze()}}]),e}(),kn=function(){function e(t,n,r,i){Object(j.a)(this,e),this.change=t,this.previous=n,this.currentConfiguraiton=r,this.currentWorkspace=i,this._previousConfiguration=void 0;var o=new Set;t.keys.forEach((function(e){return o.add(e)})),t.overrides.forEach((function(e){return Object(He.a)(e,2)[1].forEach((function(e){return o.add(e)}))})),this.affectedKeys=Object(ee.a)(o.values());var a=new yn;this.affectedKeys.forEach((function(e){return a.setValue(e,{})})),this.affectedKeysTree=a.contents}return Object(F.a)(e,[{key:"affectsConfiguration",value:function(e,t){var n;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){var r=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(n=this.previous)||void 0===n?void 0:n.workspace):void 0,i=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!_n.e(r,i)}return!0}return!1}},{key:"doesAffectedKeysTreeContains",value:function(e,t){for(var n,r=Object(mn.g)(Object(Be.a)({},t,!0),(function(){}));"object"===typeof r&&(n=Object.keys(r)[0]);){if(!(e=e[n]))return!1;r=r[n]}return!0}},{key:"previousConfiguration",get:function(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Cn.parse(this.previous.data)),this._previousConfiguration}}]),e}(),En=n(2),wn=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o,a){var s;return Object(j.a)(this,n),(s=t.call(this))._contextKeyService=e,s._commandService=r,s._telemetryService=i,s._notificationService=o,s._logService=a,s._onDidUpdateKeybindings=s._register(new U.a),s._currentChord=null,s._currentChordChecker=new Oe.c,s._currentChordStatusMessage=null,s._logging=!1,s}return Object(F.a)(n,[{key:"dispose",value:function(){Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}},{key:"_log",value:function(e){this._logging&&this._logService.info("[KeybindingService]: ".concat(e))}},{key:"getKeybindings",value:function(){return this._getResolver().getKeybindings()}},{key:"lookupKeybindings",value:function(e){return Ue.d(this._getResolver().lookupKeybindings(e).map((function(e){return e.resolvedKeybinding})))}},{key:"lookupKeybinding",value:function(e){var t=this._getResolver().lookupPrimaryKeybinding(e);if(t)return t.resolvedKeybinding}},{key:"dispatchEvent",value:function(e,t){return this._dispatch(e,t)}},{key:"softDispatch",value:function(e,t){var n=this.resolveKeyboardEvent(e);if(n.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var r=n.getDispatchParts(),i=Object(He.a)(r,1)[0];if(null===i)return null;var o=this._contextKeyService.getContext(t),a=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,a,i)}},{key:"_enterChordMode",value:function(e,t){var n=this;this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(En.a("first.chord","({0}) was pressed. Waiting for second key of chord...",t));var r=Date.now();this._currentChordChecker.cancelAndSet((function(){n._documentHasFocus()?Date.now()-r>5e3&&n._leaveChordMode():n._leaveChordMode()}),500)}},{key:"_leaveChordMode",value:function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}},{key:"_dispatch",value:function(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t)}},{key:"_doDispatch",value:function(e,t){var n=this,r=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;var i=e.getDispatchParts(),o=Object(He.a)(i,1)[0];if(null===o)return this._log("\\ Keyboard event cannot be dispatched."),r;var a=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null,l=e.getLabel(),c=this._getResolver().resolve(a,s,o);return this._logService.trace("KeybindingService#dispatch",l,null===c||void 0===c?void 0:c.commandId),c&&c.enterChord?(r=!0,this._enterChordMode(o,l),r):(this._currentChord&&(c&&c.commandId||(this._notificationService.status(En.a("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:1e4}),r=!0)),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(r=!0),"undefined"===typeof c.commandArgs?this._commandService.executeCommand(c.commandId).then(void 0,(function(e){return n._notificationService.warn(e)})):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,(function(e){return n._notificationService.warn(e)})),this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),r)}},{key:"mightProducePrintableCharacter",value:function(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}},{key:"onDidUpdateKeybindings",get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:U.b.None}}]),n}(Te.a),On=function(){function e(t,n,r){Object(j.a)(this,e),this._log=r,this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i=0;i--){var o=r[i];if(o.command!==n.command){var a=o.keypressParts.length>1,s=n.keypressParts.length>1;a&&s&&o.keypressParts[1]!==n.keypressParts[1]||e.whenIsEntirelyIncluded(o.when,n.when)&&this._removeFromLookupMap(o)}}r.push(n),this._addToLookupMap(n)}},{key:"_addToLookupMap",value:function(e){if(e.command){var t=this._lookupMap.get(e.command);"undefined"===typeof t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}}},{key:"_removeFromLookupMap",value:function(e){if(e.command){var t=this._lookupMap.get(e.command);if("undefined"!==typeof t)for(var n=0,r=t.length;n=0;i--)n[r++]=t[i];return n}},{key:"lookupPrimaryKeybinding",value:function(e){var t=this._lookupMap.get(e);return"undefined"===typeof t||0===t.length?null:t[t.length-1]}},{key:"resolve",value:function(e,t,n){this._log("| Resolving ".concat(n).concat(t?" chorded from ".concat(t):""));var r=null;if(null!==t){var i=this._map.get(t);if("undefined"===typeof i)return this._log("\\ No keybinding entries."),null;r=[];for(var o=0,a=i.length;o1&&null!==c.keypressParts[1]?(this._log("\\ From ".concat(r.length," keybinding entries, matched chord, when: ").concat(Tn(c.when),", source: ").concat(xn(c),".")),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log("\\ From ".concat(r.length," keybinding entries, matched ").concat(c.command,", when: ").concat(Tn(c.when),", source: ").concat(xn(c),".")),{enterChord:!1,leaveChord:c.keypressParts.length>1,commandId:c.command,commandArgs:c.commandArgs,bubble:c.bubble}):(this._log("\\ From ".concat(r.length," keybinding entries, no when clauses matched the context.")),null)}},{key:"_findCommand",value:function(t,n){for(var r=n.length-1;r>=0;r--){var i=n[r];if(e.contextMatchesRules(t,i.when))return i}return null}}],[{key:"_isTargetedForRemoval",value:function(e,t,n,r,i){if(e.command!==r)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(n&&e.keypressParts[1]!==n)return!1;if(i){if(!e.when)return!1;if(!i.equals(e.when))return!1}return!0}},{key:"combine",value:function(e,t){e=e.slice(0);var n,r=[],i=Object(Z.a)(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.command&&0!==o.command.length&&"-"===o.command.charAt(0))for(var a=o.command.substr(1),s=o.keypressParts[0],l=o.keypressParts[1],c=o.when,u=e.length-1;u>=0;u--)this._isTargetedForRemoval(e[u],s,l,a,c)&&e.splice(u,1);else r.push(o)}}catch(d){i.e(d)}finally{i.f()}return e.concat(r)}},{key:"whenIsEntirelyIncluded",value:function(e,t){return!t||!!e&&this._implies(e,t)}},{key:"_implies",value:function(e,t){for(var n=function(e){return 9===e.type?e.expr:[e]},r=n(e.negate()).concat(n(t)),i=0;i2&&void 0!==arguments[2]?arguments[2]:n;Object(j.a)(this,e),this.modifierLabels=[null],this.modifierLabels[2]=t,this.modifierLabels[1]=n,this.modifierLabels[3]=r}return Object(F.a)(e,[{key:"toLabel",value:function(e,t,n){if(0===t.length)return null;for(var r=[],i=0,o=t.length;i1}},{key:"getParts",value:function(){var e=this;return this._parts.map((function(t){return e._getPart(t)}))}},{key:"_getPart",value:function(e){return new H.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}},{key:"getDispatchParts",value:function(){var e=this;return this._parts.map((function(t){return e._getDispatchPart(t)}))}}]),n}(H.c)),Pn=n(59),jn=n(210),Fn=n(63),Bn=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Un=function(e,t){return function(n,r){t(n,r,e)}},Hn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},zn=function(){function e(t){Object(j.a)(this,e),this.disposed=!1,this.model=t,this._onDispose=new U.a}return Object(F.a)(e,[{key:"dispose",value:function(){this.disposed=!0,this._onDispose.fire()}},{key:"textEditorModel",get:function(){return this.model}}]),e}();var Vn=function(){function e(t){Object(j.a)(this,e),this.modelService=t}return Object(F.a)(e,[{key:"setEditor",value:function(e){this.editor=e}},{key:"createModelReference",value:function(e){var t,n,r,i=this,o=null;return this.editor&&(t=this.editor,n=function(t){return i.findModel(t,e)},r=function(t){return i.findModel(t.getOriginalEditor(),e)||i.findModel(t.getModifiedEditor(),e)},o=Object(hn.b)(t)?n(t):r(t)),o?Promise.resolve(new Te.c(new zn(o))):Promise.reject(new Error("Model not found"))}},{key:"findModel",value:function(e,t){var n=this.modelService.getModel(t);return n&&n.uri.toString()!==t.toString()?null:n}}]),e}();Vn=Bn([Un(0,Ct.a)],Vn);var Wn=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"show",value:function(){return e.NULL_PROGRESS_RUNNER}},{key:"showWhile",value:function(e,t){return Promise.resolve(void 0)}}]),e}();Wn.NULL_PROGRESS_RUNNER={done:function(){},total:function(){},worked:function(){}};var Gn=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"confirm",value:function(e){return this.doConfirm(e).then((function(e){return{confirmed:e,checkboxChecked:!1}}))}},{key:"doConfirm",value:function(e){var t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}},{key:"show",value:function(e,t,n,r){return Promise.resolve({choice:0})}}]),e}(),qn=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"info",value:function(e){return this.notify({severity:dn.a.Info,message:e})}},{key:"warn",value:function(e){return this.notify({severity:dn.a.Warning,message:e})}},{key:"error",value:function(e){return this.notify({severity:dn.a.Error,message:e})}},{key:"notify",value:function(t){switch(t.severity){case dn.a.Error:console.error(t.message);break;case dn.a.Warning:console.warn(t.message);break;default:console.log(t.message)}return e.NO_OP}},{key:"status",value:function(e,t){return Te.a.None}}]),e}();qn.NO_OP=new Pn.b;var Kn=function(){function e(t){Object(j.a)(this,e),this._onWillExecuteCommand=new U.a,this._onDidExecuteCommand=new U.a,this._instantiationService=t}return Object(F.a)(e,[{key:"executeCommand",value:function(e){var t=ae.a.getCommand(e);if(!t)return Promise.reject(new Error("command '".concat(e,"' not found")));try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0){var c=new kn({keys:r,overrides:[]},n,this._configuration);c.source=7,c.sourceConfig=null,this._onDidChangeConfiguration.fire(c)}return Promise.resolve()}}]),e}(),Zn=function(){function e(t){var n=this;Object(j.a)(this,e),this.configurationService=t,this._onDidChangeConfiguration=new U.a,this.configurationService.onDidChangeConfiguration((function(e){n._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:function(t,n){return e.affectsConfiguration(n)}})}))}return Object(F.a)(e,[{key:"getValue",value:function(e,t,n){var r=(V.a.isIPosition(t)?t:null)?"string"===typeof n?n:void 0:"string"===typeof t?t:void 0;return"undefined"===typeof r?this.configurationService.getValue():this.configurationService.getValue(r)}}]),e}(),Xn=function(){function e(t){Object(j.a)(this,e),this.configurationService=t}return Object(F.a)(e,[{key:"getEOL",value:function(e,t){var n=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return n&&"auto"!==n?n:Ne.d||Ne.f?"\n":"\r\n"}}]),e}();Xn=Bn([Un(0,mn.a)],Xn);var Jn=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"publicLog",value:function(e,t){return Promise.resolve(void 0)}},{key:"publicLog2",value:function(e,t){return this.publicLog(e,t)}}]),e}(),er=function(){function e(){Object(j.a)(this,e);var t=z.a.from({scheme:e.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new jn.b({uri:t,name:"",index:0})]}}return Object(F.a)(e,[{key:"getWorkspace",value:function(){return this.workspace}},{key:"getWorkspaceFolder",value:function(t){return t&&t.scheme===e.SCHEME?this.workspace.folders[0]:null}}]),e}();function tr(e,t,n){if(t&&e instanceof Qn){var r=[];Object.keys(t).forEach((function(e){Object(pn.d)(e)&&r.push(["editor.".concat(e),t[e]]),n&&Object(pn.c)(e)&&r.push(["diffEditor.".concat(e),t[e]])})),r.length>0&&e.updateValues(r)}}er.SCHEME="inmemory";var nr=function(){function e(t){Object(j.a)(this,e),this._modelService=t}return Object(F.a)(e,[{key:"hasPreviewHandler",value:function(){return!1}},{key:"apply",value:function(e,t){return Hn(this,void 0,void 0,J.a.mark((function t(){var n,r,i,o,a,s,l,c,u,d,h,f,p;return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=new Map,r=Object(Z.a)(e),t.prev=2,r.s();case 4:if((i=r.n()).done){t.next=18;break}if((o=i.value)instanceof fn.c){t.next=8;break}throw new Error("bad edit - only text edits are supported");case 8:if(a=this._modelService.getModel(o.resource)){t.next=11;break}throw new Error("bad edit - model not found");case 11:if("number"!==typeof o.versionId||a.getVersionId()===o.versionId){t.next=13;break}throw new Error("bad state - model changed in the meantime");case 13:(s=n.get(a))||(s=[],n.set(a,s)),s.push(gn.a.replaceMove(W.a.lift(o.textEdit.range),o.textEdit.text));case 16:t.next=4;break;case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(2),r.e(t.t0);case 23:return t.prev=23,r.f(),t.finish(23);case 26:l=0,c=0,u=Object(Z.a)(n);try{for(u.s();!(d=u.n()).done;)h=Object(He.a)(d.value,2),f=h[0],p=h[1],f.pushStackElement(),f.pushEditOperations([],p,(function(){return[]})),f.pushStackElement(),c+=1,l+=p.length}catch(g){u.e(g)}finally{u.f()}return t.abrupt("return",{ariaSummary:Qe.x(Fn.g.bulkEditServiceSummary,l,c)});case 31:case"end":return t.stop()}}),t,this,[[2,20,23,26]])})))}}]),e}(),rr=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"getUriLabel",value:function(e,t){return"file"===e.scheme?e.fsPath:e.path}}]),e}(),ir=function(){function e(t,n){Object(j.a)(this,e),this._codeEditorService=t,this._container=n,this.onLayout=U.b.None}return Object(F.a)(e,[{key:"focus",value:function(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}},{key:"dimension",get:function(){return this._dimension||(this._dimension=te.getClientArea(window.document.body)),this._dimension}},{key:"container",get:function(){return this._container}}]),e}(),or=n(74),ar=n(194),sr=n(308),lr=n(273),cr=n(153),ur=n(40),dr=n(18),hr=n(90),fr=n(29),pr=n(60),gr=n(30),mr=n(86),vr=n(129),_r=n(89),br=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},yr=function(e,t){return function(n,r){t(n,r,e)}},Sr=0,Cr=!1;var kr=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o,a,s,l,c,u,d){var h;return Object(j.a)(this,n),(r=r||{}).ariaLabel=r.ariaLabel||Fn.h.editorViewAccessibleLabel,r.ariaLabel=r.ariaLabel+";"+Fn.h.accessibilityHelpMessage,(h=t.call(this,e,r,{},i,o,a,s,c,u,d))._standaloneKeybindingService=l instanceof Yn?l:null,Cr||(Cr=!0,or.b(document.body)),h}return Object(F.a)(n,[{key:"addCommand",value:function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var r="DYNAMIC_"+ ++Sr,i=dr.a.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(r,e,t,i),r}},{key:"createContextKey",value:function(e,t){return this._contextKeyService.createKey(e,t)}},{key:"addAction",value:function(e){var t=this;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"),Te.a.None;var n=e.id,r=e.label,i=dr.a.and(dr.a.equals("editorId",this.getId()),dr.a.deserialize(e.precondition)),o=e.keybindings,a=dr.a.and(i,dr.a.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]&&arguments[1],n=Pr(e);Ar.push(n),n.userConfigured?Rr.push(n):Ir.push(n),t&&!n.userConfigured&&Ar.forEach((function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<".concat(n.extension,">> to now point to mime <<").concat(n.mime,">>")),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<".concat(n.filename,">> to now point to mime <<").concat(n.mime,">>")),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<".concat(n.filepattern,">> to now point to mime <<").concat(n.mime,">>")),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<".concat(n.firstline,">> to now point to mime <<").concat(n.mime,">>")))}))}function Pr(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(xr.e.sep)>=0}}function jr(e,t){var n;if(e)switch(e.scheme){case ie.b.file:n=e.fsPath;break;case ie.b.data:n=oe.a.parseMetaData(e).get(oe.a.META_DATA_LABEL);break;default:n=e.path}if(!n)return[Lr];n=n.toLowerCase();var r=Object(xr.a)(n),i=Fr(n,r,Rr);if(i)return[i,Dr];var o=Fr(n,r,Ir);if(o)return[o,Dr];if(t){var a=function(e){Object(Qe.U)(e)&&(e=e.substr(1));if(e.length>0)for(var t=Ar.length-1;t>=0;t--){var n=Ar[t];if(n.firstline){var r=e.match(n.firstline);if(r&&r.length>0)return n.mime}}return null}(t);if(a)return[a,Dr]}return[Lr]}function Fr(e,t,n){for(var r=null,i=null,o=null,a=n.length-1;a>=0;a--){var s=n[a];if(t===s.filenameLowercase){r=s;break}if(s.filepattern&&(!i||s.filepattern.length>i.filepattern.length)){var l=s.filepatternOnPath?e:t;Object(Nr.a)(s.filepatternLowercase,l)&&(i=s)}s.extension&&(!o||s.extension.length>o.extension.length)&&t.endsWith(s.extensionLowercase)&&(o=s)}return r?r.mime:i?i.mime:o?o.mime:null}var Br=n(160),Ur=n(65),Hr=Object.prototype.hasOwnProperty,zr=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){var e,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(j.a)(this,n),(e=t.call(this))._onDidChange=e._register(new U.a),e.onDidChange=e._onDidChange.event,e._warnOnOverwrite=i,e._nextLanguageId2=1,e._languageIdToLanguage=[],e._languageToLanguageId=Object.create(null),e._languages={},e._mimeTypesMap={},e._nameMap={},e._lowercaseNameMap={},r&&(e._initializeFromRegistry(),e._register(Br.a.onDidChangeLanguages((function(t){return e._initializeFromRegistry()})))),e}return Object(F.a)(n,[{key:"_initializeFromRegistry",value:function(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};var e=Br.a.getLanguages();this._registerLanguages(e)}},{key:"_registerLanguages",value:function(e){var t,n=this,r=Object(Z.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;this._registerLanguage(i)}}catch(o){r.e(o)}finally{r.f()}this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((function(e){var t=n._languages[e];t.name&&(n._nameMap[t.name]=t.identifier),t.aliases.forEach((function(e){n._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((function(e){n._mimeTypesMap[e]=t.identifier}))})),Ur.a.as(bn.a.Configuration).registerOverrideIdentifiers(Br.a.getLanguages().map((function(e){return e.id}))),this._onDidChange.fire()}},{key:"_getLanguageId",value:function(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];var t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}},{key:"_registerLanguage",value:function(e){var t,n=e.id;if(Hr.call(this._languages,n))t=this._languages[n];else{var r=this._getLanguageId(n);t={identifier:new _e.r(n,r),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[n]=t}this._mergeLanguage(t,e)}},{key:"_mergeLanguage",value:function(e,t){var n,r=t.id,i=null;Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&((n=e.mimetypes).push.apply(n,Object(ee.a)(t.mimetypes)),i=t.mimetypes[0]);if(i||(i="text/x-".concat(r),e.mimetypes.push(i)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);var o,a=Object(Z.a)(t.extensions);try{for(a.s();!(o=a.n()).done;){Mr({id:r,mime:i,extension:o.value},this._warnOnOverwrite)}}catch(y){a.e(y)}finally{a.f()}}if(Array.isArray(t.filenames)){var s,l=Object(Z.a)(t.filenames);try{for(l.s();!(s=l.n()).done;){var c=s.value;Mr({id:r,mime:i,filename:c},this._warnOnOverwrite),e.filenames.push(c)}}catch(y){l.e(y)}finally{l.f()}}if(Array.isArray(t.filenamePatterns)){var u,d=Object(Z.a)(t.filenamePatterns);try{for(d.s();!(u=d.n()).done;){Mr({id:r,mime:i,filepattern:u.value},this._warnOnOverwrite)}}catch(y){d.e(y)}finally{d.f()}}if("string"===typeof t.firstLine&&t.firstLine.length>0){var h=t.firstLine;"^"!==h.charAt(0)&&(h="^"+h);try{var f=new RegExp(h);Qe.P(f)||Mr({id:r,mime:i,firstline:f},this._warnOnOverwrite)}catch(y){Object(xe.e)(y)}}e.aliases.push(r);var p=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(p=0===t.aliases.length?[null]:t.aliases),null!==p){var g,m=Object(Z.a)(p);try{for(m.s();!(g=m.n()).done;){var v=g.value;v&&0!==v.length&&e.aliases.push(v)}}catch(y){m.e(y)}finally{m.f()}}var _=null!==p&&p.length>0;if(_&&null===p[0]);else{var b=(_?p[0]:null)||r;!_&&e.name||(e.name=b)}t.configuration&&e.configurationFiles.push(t.configuration)}},{key:"isRegisteredMode",value:function(e){return!!Hr.call(this._mimeTypesMap,e)||Hr.call(this._languages,e)}},{key:"getModeIdForLanguageNameLowercase",value:function(e){return Hr.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}},{key:"extractModeIds",value:function(e){var t=this;return e?e.split(",").map((function(e){return e.trim()})).map((function(e){return Hr.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e})).filter((function(e){return Hr.call(t._languages,e)})):[]}},{key:"getLanguageIdentifier",value:function(e){if(e===be.b||0===e)return be.a;var t;if("string"===typeof e)t=e;else if(!(t=this._languageIdToLanguage[e]))return null;return Hr.call(this._languages,t)?this._languages[t].identifier:null}},{key:"getModeIdsFromFilepathOrFirstLine",value:function(e,t){if(!e&&!t)return[];var n=jr(e,t);return this.extractModeIds(n.join(","))}}]),n}(Te.a),Vr=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this))._onDidChange=i._register(new U.a),i.onDidChange=i._onDidChange.event,i._selector=r,i.languageIdentifier=i._selector(),i._register(e((function(){return i._evaluate()}))),i}return Object(F.a)(n,[{key:"_evaluate",value:function(){var e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}]),n}(Te.a),Wr=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(j.a)(this,e),this._onDidCreateMode=new U.a,this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=new U.a,this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=new zr(!0,n),this._registry.onDidChange((function(){return t._onLanguagesMaybeChanged.fire()}))}return Object(F.a)(e,[{key:"isRegisteredMode",value:function(e){return this._registry.isRegisteredMode(e)}},{key:"getModeIdForLanguageName",value:function(e){return this._registry.getModeIdForLanguageNameLowercase(e)}},{key:"getModeIdByFilepathOrFirstLine",value:function(e,t){var n=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return Object(Ue.k)(n,null)}},{key:"getModeId",value:function(e){var t=this._registry.extractModeIds(e);return Object(Ue.k)(t,null)}},{key:"getLanguageIdentifier",value:function(e){return this._registry.getLanguageIdentifier(e)}},{key:"create",value:function(e){var t=this;return new Vr(this.onLanguagesMaybeChanged,(function(){var n=t.getModeId(e);return t._createModeAndGetLanguageIdentifier(n)}))}},{key:"createByFilepathOrFirstLine",value:function(e,t){var n=this;return new Vr(this.onLanguagesMaybeChanged,(function(){var r=n.getModeIdByFilepathOrFirstLine(e,t);return n._createModeAndGetLanguageIdentifier(r)}))}},{key:"_createModeAndGetLanguageIdentifier",value:function(e){var t=this.getLanguageIdentifier(e||"plaintext")||be.a;return this._getOrCreateMode(t.language),t}},{key:"triggerMode",value:function(e){var t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}},{key:"_getOrCreateMode",value:function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e)||be.a;this._instantiatedModes[e]=new Tr(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}]),e}(),Gr=n(236),qr=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){var e;return Object(j.a)(this,n),(e=t.call(this))._onCodeEditorAdd=e._register(new U.a),e.onCodeEditorAdd=e._onCodeEditorAdd.event,e._onCodeEditorRemove=e._register(new U.a),e.onCodeEditorRemove=e._onCodeEditorRemove.event,e._onDiffEditorAdd=e._register(new U.a),e._onDiffEditorRemove=e._register(new U.a),e._modelProperties=new Map,e._codeEditors=Object.create(null),e._diffEditors=Object.create(null),e}return Object(F.a)(n,[{key:"addCodeEditor",value:function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}},{key:"removeCodeEditor",value:function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}},{key:"listCodeEditors",value:function(){var e=this;return Object.keys(this._codeEditors).map((function(t){return e._codeEditors[t]}))}},{key:"addDiffEditor",value:function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}},{key:"removeDiffEditor",value:function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}},{key:"listDiffEditors",value:function(){var e=this;return Object.keys(this._diffEditors).map((function(t){return e._diffEditors[t]}))}},{key:"getFocusedCodeEditor",value:function(){var e,t=null,n=this.listCodeEditors(),r=Object(Z.a)(n);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(t=i)}}catch(o){r.e(o)}finally{r.f()}return t}},{key:"setModelProperty",value:function(e,t,n){var r,i=e.toString();this._modelProperties.has(i)?r=this._modelProperties.get(i):(r=new Map,this._modelProperties.set(i,r)),r.set(t,n)}},{key:"getModelProperty",value:function(e,t){var n=e.toString();if(this._modelProperties.has(n))return this._modelProperties.get(n).get(t)}}]),n}(Te.a),Kr=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Yr=function(e,t){return function(n,r){t(n,r,e)}},$r=function(){function e(t,n,r){Object(j.a)(this,e),this._parent=t,this._editorId=n,this._styleSheet=r,this._refCount=0}return Object(F.a)(e,[{key:"ref",value:function(){this._refCount++}},{key:"unref",value:function(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}},{key:"insertRule",value:function(e,t){this._styleSheet.sheet.insertRule(e,t)}},{key:"removeRulesContainingSelector",value:function(e){te.removeCSSRulesContainingSelector(e,this._styleSheet)}}]),e}(),Qr=function(){function e(t){Object(j.a)(this,e),this._styleSheet=t}return Object(F.a)(e,[{key:"ref",value:function(){}},{key:"unref",value:function(){}},{key:"insertRule",value:function(e,t){this._styleSheet.sheet.insertRule(e,t)}},{key:"removeRulesContainingSelector",value:function(e){te.removeCSSRulesContainingSelector(e,this._styleSheet)}}]),e}(),Zr=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object(j.a)(this,n),(r=t.call(this))._decorationOptionProviders=new Map,r._editorStyleSheets=new Map,r._globalStyleSheet=i||null,r._themeService=e,r}return Object(F.a)(n,[{key:"_getOrCreateGlobalStyleSheet",value:function(){return this._globalStyleSheet||(this._globalStyleSheet=new Qr(te.createStyleSheet())),this._globalStyleSheet}},{key:"_getOrCreateStyleSheet",value:function(e){if(!e)return this._getOrCreateGlobalStyleSheet();var t=e.getContainerDomNode();if(!te.isInShadowDOM(t))return this._getOrCreateGlobalStyleSheet();var n=e.getId();if(!this._editorStyleSheets.has(n)){var r=new $r(this,n,te.createStyleSheet(t));this._editorStyleSheets.set(n,r)}return this._editorStyleSheets.get(n)}},{key:"_removeEditorStyleSheets",value:function(e){this._editorStyleSheets.delete(e)}},{key:"registerDecorationType",value:function(e,t,n,r){var i=this._decorationOptionProviders.get(e);if(!i){var o=this._getOrCreateStyleSheet(r),a={styleSheet:o,key:e,parentTypeKey:n,options:t||Object.create(null)};i=n?new Xr(this._themeService,o,a):new Jr(this._themeService,o,a),this._decorationOptionProviders.set(e,i)}i.refCount++}},{key:"removeDecorationType",value:function(e){var t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((function(t){return t.removeDecorations(e)}))))}},{key:"resolveDecorationOptions",value:function(e,t){var n=this._decorationOptionProviders.get(e);if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)}}]),n}(qr);Zr=Kr([Yr(0,gr.c)],Zr);var Xr=function(){function e(t,n,r){Object(j.a)(this,e),this._styleSheet=n,this._styleSheet.ref(),this._parentTypeKey=r.parentTypeKey,this.refCount=0,this._beforeContentRules=new ti(3,r,t),this._afterContentRules=new ti(4,r,t)}return Object(F.a)(e,[{key:"getOptions",value:function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n}},{key:"dispose",value:function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}]),e}(),Jr=function(){function e(t,n,r){var i=this;Object(j.a)(this,e),this._disposables=new Te.b,this._styleSheet=n,this._styleSheet.ref(),this.refCount=0;var o=function(e){var n=new ti(e,r,t);if(i._disposables.add(n),n.hasContent)return n.className};this.className=o(0);var a=function(e){var n=new ti(e,r,t);return i._disposables.add(n),n.hasContent?{className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null}(1);a&&(this.inlineClassName=a.className,this.inlineClassNameAffectsLetterSpacing=a.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),this.glyphMarginClassName=o(2);var s=r.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;var l=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,c=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;"undefined"===typeof l&&"undefined"===typeof c||(this.overviewRuler={color:l||c,darkColor:c||l,position:s.overviewRulerLane||ve.d.Center})}return Object(F.a)(e,[{key:"getOptions",value:function(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}},{key:"dispose",value:function(){this._disposables.dispose(),this._styleSheet.unref()}}]),e}(),ei={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};"},ti=function(){function e(t,n,r){var i=this;Object(j.a)(this,e),this._theme=r.getColorTheme(),this._ruleType=t,this._providerArgs=n,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=ni.getClassName(this._providerArgs.key,t);this._providerArgs.parentTypeKey&&(o=o+" "+ni.getClassName(this._providerArgs.parentTypeKey,t)),this._className=o,this._unThemedSelector=ni.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,t),this._buildCSS(),this._usesThemeColors?this._themeListener=r.onDidColorThemeChange((function(e){i._theme=r.getColorTheme(),i._removeCSS(),i._buildCSS()})):this._themeListener=null}return Object(F.a)(e,[{key:"dispose",value:function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}},{key:"_buildCSS",value:function(){var e,t,n,r=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(r),t=this.getCSSTextForModelDecorationClassName(r.light),n=this.getCSSTextForModelDecorationClassName(r.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(r),t=this.getCSSTextForModelDecorationInlineClassName(r.light),n=this.getCSSTextForModelDecorationInlineClassName(r.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(r),t=this.getCSSTextForModelDecorationGlyphMarginClassName(r.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(r.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(r.before),t=this.getCSSTextForModelDecorationContentClassName(r.light&&r.light.before),n=this.getCSSTextForModelDecorationContentClassName(r.dark&&r.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(r.after),t=this.getCSSTextForModelDecorationContentClassName(r.light&&r.light.after),n=this.getCSSTextForModelDecorationContentClassName(r.dark&&r.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var i=this._providerArgs.styleSheet,o=!1;e.length>0&&(i.insertRule("".concat(this._unThemedSelector," {").concat(e,"}"),0),o=!0),t.length>0&&(i.insertRule(".vs".concat(this._unThemedSelector," {").concat(t,"}"),0),o=!0),n.length>0&&(i.insertRule(".vs-dark".concat(this._unThemedSelector,", .hc-black").concat(this._unThemedSelector," {").concat(n,"}"),0),o=!0),this._hasContent=o}},{key:"_removeCSS",value:function(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}},{key:"getCSSTextForModelDecorationClassName",value:function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}},{key:"getCSSTextForModelDecorationInlineClassName",value:function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}},{key:"getCSSTextForModelDecorationContentClassName",value:function(e){if(!e)return"";var t=[];if("undefined"!==typeof e){if(this.collectBorderSettingsCSSText(e,t),"undefined"!==typeof e.contentIconPath&&t.push(Qe.x(ei.contentIconPath,te.asCSSUrl(z.a.revive(e.contentIconPath)))),"string"===typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(Qe.x(ei.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("")}},{key:"getCSSTextForModelDecorationGlyphMarginClassName",value:function(e){if(!e)return"";var t=[];return"undefined"!==typeof e.gutterIconPath&&(t.push(Qe.x(ei.gutterIconPath,te.asCSSUrl(z.a.revive(e.gutterIconPath)))),"undefined"!==typeof e.gutterIconSize&&t.push(Qe.x(ei.gutterIconSize,e.gutterIconSize))),t.join("")}},{key:"collectBorderSettingsCSSText",value:function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Qe.x("box-sizing: border-box;")),!0)}},{key:"collectCSSText",value:function(e,t,n){var r,i=n.length,o=Object(Z.a)(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.resolveValue(e[a]);"string"===typeof s&&n.push(Qe.x(ei[a],s))}}catch(l){o.e(l)}finally{o.f()}return n.length!==i}},{key:"resolveValue",value:function(e){if(Object(me.b)(e)){this._usesThemeColors=!0;var t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}},{key:"hasContent",get:function(){return this._hasContent}},{key:"hasLetterSpacing",get:function(){return this._hasLetterSpacing}},{key:"className",get:function(){return this._className}}]),e}(),ni=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,null,[{key:"getClassName",value:function(e,t){return"ced-"+e+"-"+t}},{key:"getSelector",value:function(e,t,n){var r=".monaco-editor ."+this.getClassName(e,n);return t&&(r=r+"."+this.getClassName(t,n)),3===n?r+="::before":4===n&&(r+="::after"),r}}]),e}(),ri=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){return Object(j.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"getActiveCodeEditor",value:function(){return null}},{key:"openCodeEditor",value:function(e,t,n){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}},{key:"doOpenEditor",value:function(e,t){if(!this.findModel(e,t.resource)){if(t.resource){var n=t.resource.scheme;if(n===ie.b.http||n===ie.b.https)return Object(te.windowOpenNoOpener)(t.resource.toString()),e}return null}var r=t.options?t.options.selection:null;if(r)if("number"===typeof r.endLineNumber&&"number"===typeof r.endColumn)e.setSelection(r),e.revealRangeInCenter(r,1);else{var i={lineNumber:r.startLineNumber,column:r.startColumn};e.setPosition(i),e.revealPositionInCenter(i,1)}return e}},{key:"findModel",value:function(e,t){var n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n}}]),n}(Zr),ii=n(23),oi=function e(t,n,r,i,o){Object(j.a)(this,e),this.token=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o};var ai=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,si=function(){function e(){Object(j.a)(this,e),this._lastColorId=0,this._id2color=[],this._color2id=new Map}return Object(F.a)(e,[{key:"getId",value:function(e){if(null===e)return 0;var t=e.match(ai);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();var n=this._color2id.get(e);return n||(n=++this._lastColorId,this._color2id.set(e,n),this._id2color[n]=ii.a.fromHex("#"+e),n)}},{key:"getColorMap",value:function(){return this._id2color.slice(0)}}]),e}(),li=function(){function e(t,n){Object(j.a)(this,e),this._colorMap=t,this._root=n,this._cache=new Map}return Object(F.a)(e,[{key:"getColorMap",value:function(){return this._colorMap.getColorMap()}},{key:"_match",value:function(e){return this._root.match(e)}},{key:"match",value:function(e,t){var n=this._cache.get(t);if("undefined"===typeof n){var r=this._match(t),i=function(e){var t=e.match(ci);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}(t);n=(r.metadata|i<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0}}],[{key:"createFromRawTokenTheme",value:function(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,r=0,i=e.length;rt?1:0}(e.token,t.token);return 0!==n?n:e.index-t.index}));for(var n=0,r="000000",i="ffffff";e.length>=1&&""===e[0].token;){var o=e.shift();-1!==o.fontStyle&&(n=o.fontStyle),null!==o.foreground&&(r=o.foreground),null!==o.background&&(i=o.background)}var a,s=new si,l=Object(Z.a)(t);try{for(l.s();!(a=l.n()).done;){var c=a.value;s.getId(c)}}catch(v){l.e(v)}finally{l.f()}for(var u=s.getId(r),d=s.getId(i),h=new ui(n,u,d),f=new di(h),p=0,g=e.length;p>>0}return Object(F.a)(e,[{key:"clone",value:function(){return new e(this._fontStyle,this._foreground,this._background)}},{key:"acceptOverwrite",value:function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}]),e}(),di=function(){function e(t){Object(j.a)(this,e),this._mainRule=t,this._children=new Map}return Object(F.a)(e,[{key:"match",value:function(e){if(""===e)return this._mainRule;var t,n,r=e.indexOf(".");-1===r?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+1));var i=this._children.get(t);return"undefined"!==typeof i?i.match(n):this._mainRule}},{key:"insert",value:function(t,n,r,i){if(""!==t){var o,a,s=t.indexOf(".");-1===s?(o=t,a=""):(o=t.substring(0,s),a=t.substring(s+1));var l=this._children.get(o);"undefined"===typeof l&&(l=new e(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,n,r,i)}else this._mainRule.acceptOverwrite(n,r,i)}}]),e}();var hi,fi,pi,gi=n(66),mi=n(11),vi={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:(hi={},Object(Be.a)(hi,mi.s,"#FFFFFE"),Object(Be.a)(hi,mi.B,"#000000"),Object(Be.a)(hi,mi.J,"#E5EBF1"),Object(Be.a)(hi,gi.h,"#D3D3D3"),Object(Be.a)(hi,gi.a,"#939393"),Object(Be.a)(hi,mi.Q,"#ADD6FF4D"),hi)},_i={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:(fi={},Object(Be.a)(fi,mi.s,"#1E1E1E"),Object(Be.a)(fi,mi.B,"#D4D4D4"),Object(Be.a)(fi,mi.J,"#3A3D41"),Object(Be.a)(fi,gi.h,"#404040"),Object(Be.a)(fi,gi.a,"#707070"),Object(Be.a)(fi,mi.Q,"#ADD6FF26"),fi)},bi={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:(pi={},Object(Be.a)(pi,mi.s,"#000000"),Object(Be.a)(pi,mi.B,"#FFFFFF"),Object(Be.a)(pi,gi.h,"#FFFFFF"),Object(Be.a)(pi,gi.a,"#FFFFFF"),pi)},yi=n(176),Si="vs",Ci="vs-dark",ki="hc-black",Ei=Ur.a.as(mi.a.ColorContribution),wi=Ur.a.as(gr.a.ThemingContribution),Oi=function(){function e(t,n){Object(j.a)(this,e),this.semanticHighlighting=!1,this.themeData=n;var r=n.base;t.length>0?(this.id=r+" "+t,this.themeName=t):(this.id=r,this.themeName=r),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object(F.a)(e,[{key:"notifyBaseUpdated",value:function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}},{key:"getColors",value:function(){if(!this.colors){var e=new Map;for(var t in this.themeData.colors)e.set(t,ii.a.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){var n=xi(this.themeData.base);for(var r in n.colors)e.has(r)||e.set(r,ii.a.fromHex(n.colors[r]))}this.colors=e}return this.colors}},{key:"getColor",value:function(e,t){var n=this.getColors().get(e);return n||(!1!==t?this.getDefault(e):void 0)}},{key:"getDefault",value:function(e){var t=this.defaultColors[e];return t||(t=Ei.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}},{key:"defines",value:function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}},{key:"getTokenStyleMetadata",value:function(e,t,n){var r=this.tokenTheme._match([e].concat(t).join(".")).metadata,i=_e.B.getForeground(r),o=_e.B.getFontStyle(r);return{foreground:i,italic:Boolean(1&o),bold:Boolean(2&o),underline:Boolean(4&o)}}},{key:"base",get:function(){return this.themeData.base}},{key:"type",get:function(){switch(this.base){case Si:return"light";case ki:return"hc";default:return"dark"}}},{key:"tokenTheme",get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=xi(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=li.createFromRawTokenTheme(e,t)}return this._tokenTheme}}]),e}();function Ti(e){return e===Si||e===Ci||e===ki}function xi(e){switch(e){case Si:return vi;case Ci:return _i;case ki:return bi}}function Ni(e){var t=xi(e);return new Oi(e,t)}var Di=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){var e;return Object(j.a)(this,n),(e=t.call(this))._onColorThemeChange=e._register(new U.a),e.onDidColorThemeChange=e._onColorThemeChange.event,e._environment=Object.create(null),e._knownThemes=new Map,e._knownThemes.set(Si,Ni(Si)),e._knownThemes.set(Ci,Ni(Ci)),e._knownThemes.set(ki,Ni(ki)),e._codiconCSS=yi.a.getCSS(),e._themeCSS="",e._allCSS="".concat(e._codiconCSS,"\n").concat(e._themeCSS),e._globalStyleElement=null,e._styleElements=[],e.setTheme(Si),yi.a.onDidChange((function(){e._codiconCSS=yi.a.getCSS(),e._updateCSS()})),e}return Object(F.a)(n,[{key:"registerEditorContainer",value:function(e){return te.isInShadowDOM(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}},{key:"_registerRegularEditorContainer",value:function(){return this._globalStyleElement||(this._globalStyleElement=te.createStyleSheet(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.innerHTML=this._allCSS,this._styleElements.push(this._globalStyleElement)),Te.a.None}},{key:"_registerShadowDomContainer",value:function(e){var t=this,n=te.createStyleSheet(e);return n.className="monaco-colors",n.innerHTML=this._allCSS,this._styleElements.push(n),{dispose:function(){for(var e=0;e=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ai=function(e,t){return function(n,r){t(n,r,e)}},Ii="data-keybinding-context",Ri=function(){function e(t,n){Object(j.a)(this,e),this._id=t,this._parent=n,this._value=Object.create(null),this._value._contextId=t}return Object(F.a)(e,[{key:"setValue",value:function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}},{key:"removeValue",value:function(e){return e in this._value&&(delete this._value[e],!0)}},{key:"getValue",value:function(e){var t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}]),e}(),Mi=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){return Object(j.a)(this,n),t.call(this,-1,null)}return Object(F.a)(n,[{key:"setValue",value:function(e,t){return!1}},{key:"removeValue",value:function(e){return!1}},{key:"getValue",value:function(e){}}]),n}(Ri);Mi.INSTANCE=new Mi;var Pi=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i){var o;return Object(j.a)(this,n),(o=t.call(this,e,null))._configurationService=r,o._values=new Map,o._listener=o._configurationService.onDidChangeConfiguration((function(e){if(6===e.source){var t=Array.from(o._values.keys());o._values.clear(),i.fire(new Bi(t))}else{var n,r=[],a=Object(Z.a)(e.affectedKeys);try{for(a.s();!(n=a.n()).done;){var s=n.value,l="config.".concat(s);o._values.has(l)&&(o._values.delete(l),r.push(l))}}catch(c){a.e(c)}finally{a.f()}i.fire(new Bi(r))}})),o}return Object(F.a)(n,[{key:"dispose",value:function(){this._listener.dispose()}},{key:"getValue",value:function(e){if(0!==e.indexOf(n._keyPrefix))return Object(Ee.a)(Object(we.a)(n.prototype),"getValue",this).call(this,e);if(this._values.has(e))return this._values.get(e);var t=e.substr(n._keyPrefix.length),r=this._configurationService.getValue(t),i=void 0;switch(typeof r){case"number":case"boolean":case"string":i=r;break;default:Array.isArray(r)&&(i=JSON.stringify(r))}return this._values.set(e,i),i}},{key:"setValue",value:function(e,t){return Object(Ee.a)(Object(we.a)(n.prototype),"setValue",this).call(this,e,t)}},{key:"removeValue",value:function(e){return Object(Ee.a)(Object(we.a)(n.prototype),"removeValue",this).call(this,e)}}]),n}(Ri);Pi._keyPrefix="config.";var ji=function(){function e(t,n,r){Object(j.a)(this,e),this._service=t,this._key=n,this._defaultValue=r,this.reset()}return Object(F.a)(e,[{key:"set",value:function(e){this._service.setContext(this._key,e)}},{key:"reset",value:function(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}},{key:"get",value:function(){return this._service.getContextKeyValue(this._key)}}]),e}(),Fi=function(){function e(t){Object(j.a)(this,e),this.key=t}return Object(F.a)(e,[{key:"affectsSome",value:function(e){return e.has(this.key)}}]),e}(),Bi=function(){function e(t){Object(j.a)(this,e),this.keys=t}return Object(F.a)(e,[{key:"affectsSome",value:function(e){var t,n=Object(Z.a)(this.keys);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e.has(r))return!0}}catch(i){n.e(i)}finally{n.f()}return!1}}]),e}(),Ui=function(){function e(t){Object(j.a)(this,e),this.events=t}return Object(F.a)(e,[{key:"affectsSome",value:function(e){var t,n=Object(Z.a)(this.events);try{for(n.s();!(t=n.n()).done;){if(t.value.affectsSome(e))return!0}}catch(r){n.e(r)}finally{n.f()}return!1}}]),e}(),Hi=function(){function e(t){Object(j.a)(this,e),this._onDidChangeContext=new U.d({merge:function(e){return new Ui(e)}}),this._isDisposed=!1,this._myContextId=t}return Object(F.a)(e,[{key:"createKey",value:function(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new ji(this,e,t)}},{key:"bufferChangeEvents",value:function(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}},{key:"createScoped",value:function(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Vi(this,e)}},{key:"contextMatchesRules",value:function(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");var t=this.getContextValuesContainer(this._myContextId);return On.contextMatchesRules(t,e)}},{key:"getContextKeyValue",value:function(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}},{key:"setContext",value:function(e,t){if(!this._isDisposed){var n=this.getContextValuesContainer(this._myContextId);n&&n.setValue(e,t)&&this._onDidChangeContext.fire(new Fi(e))}}},{key:"removeContext",value:function(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Fi(e))}},{key:"getContext",value:function(e){return this._isDisposed?Mi.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Ii)){var t=e.getAttribute(Ii);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}},{key:"onDidChangeContext",get:function(){return this._onDidChangeContext.event}}]),e}(),zi=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;Object(j.a)(this,n),(r=t.call(this,0))._contexts=new Map,r._toDispose=new Te.b,r._lastContextId=0;var i=new Pi(r._myContextId,e,r._onDidChangeContext);return r._contexts.set(r._myContextId,i),r._toDispose.add(i),r}return Object(F.a)(n,[{key:"dispose",value:function(){this._isDisposed=!0,this._toDispose.dispose()}},{key:"getContextValuesContainer",value:function(e){return this._isDisposed?Mi.INSTANCE:this._contexts.get(e)||Mi.INSTANCE}},{key:"createChildContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._myContextId;if(this._isDisposed)throw new Error("ContextKeyService has been disposed");var t=++this._lastContextId;return this._contexts.set(t,new Ri(t,this.getContextValuesContainer(e))),t}},{key:"disposeContext",value:function(e){this._isDisposed||this._contexts.delete(e)}}]),n}(Hi);zi=Li([Ai(0,mn.a)],zi);var Vi=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this,e.createChildContext()))._parent=e,r&&(i._domNode=r,i._domNode.setAttribute(Ii,String(i._myContextId))),i}return Object(F.a)(n,[{key:"dispose",value:function(){this._isDisposed=!0,this._parent.disposeContext(this._myContextId),this._domNode&&(this._domNode.removeAttribute(Ii),this._domNode=void 0)}},{key:"getContextValuesContainer",value:function(e){return this._isDisposed?Mi.INSTANCE:this._parent.getContextValuesContainer(e)}},{key:"createChildContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._myContextId;if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}},{key:"disposeContext",value:function(e){this._isDisposed||this._parent.disposeContext(e)}},{key:"onDidChangeContext",get:function(){return U.b.any(this._parent.onDidChangeContext,this._onDidChangeContext.event)}}]),n}(Hi);ae.a.registerCommand(dr.d,(function(e,t,n){e.get(dr.b).createKey(String(t),n)}));n(475);var Wi=n(69),Gi=n(36),qi=n(122),Ki=n(109),Yi=(n(476),n(105)),$i=n(152);function Qi(e,t,n){var r=n.offset+n.size;return 0===n.position?t<=e-r?r:t<=n.offset?n.offset-t:Math.max(e-t,0):t<=n.offset?n.offset-t:t<=e-r?r:0}var Zi=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this)).container=null,i.delegate=null,i.toDisposeOnClean=Te.a.None,i.toDisposeOnSetContainer=Te.a.None,i.shadowRoot=null,i.shadowRootHostElement=null,i.view=te.$(".context-view"),i.useFixedPosition=!1,i.useShadowDOM=!1,te.hide(i.view),i.setContainer(e,r),i._register(Object(Te.h)((function(){return i.setContainer(null,1)}))),i}return Object(F.a)(n,[{key:"setContainer",value:function(e,t){var r=this;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,te.removeNode(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=te.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="\n\t\t\t\t\t\n\t\t\t\t"),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(te.$("slot"))):this.container.appendChild(this.view);var i=new Te.b;n.BUBBLE_UP_EVENTS.forEach((function(e){i.add(te.addStandardDisposableListener(r.container,e,(function(e){r.onDOMEvent(e,!1)})))})),n.BUBBLE_DOWN_EVENTS.forEach((function(e){i.add(te.addStandardDisposableListener(r.container,e,(function(e){r.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}},{key:"show",value:function(e){this.isVisible()&&this.hide(),te.clearNode(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",te.show(this.view),this.toDisposeOnClean=e.render(this.view)||Te.a.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}},{key:"getViewElement",value:function(){return this.view}},{key:"layout",value:function(){this.isVisible()&&(!1!==this.delegate.canRelayout||Ne.c&&$i.a.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}},{key:"doLayout",value:function(){if(this.isVisible()){var e,t=this.delegate.getAnchor();if(te.isHTMLElement(t)){var n=te.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};var r,i=te.getTotalWidth(this.view),o=te.getTotalHeight(this.view),a=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,l={offset:e.top-window.pageYOffset,size:e.height,position:0===a?0:1};r=0===s?{offset:e.left,size:0,position:0}:{offset:e.left+e.width,size:0,position:1};var c=Qi(window.innerHeight,o,l)+window.pageYOffset;Yi.a.intersects({start:c,end:c+o},{start:l.offset,end:l.offset+l.size})&&(r.size=e.width,1===s&&(r.offset=e.left));var u=Qi(window.innerWidth,i,r);te.removeClasses(this.view,"top","bottom","left","right"),te.addClass(this.view,0===a?"bottom":"top"),te.addClass(this.view,0===s?"left":"right"),te.toggleClass(this.view,"fixed",this.useFixedPosition);var d=te.getDomNodePagePosition(this.container);this.view.style.top="".concat(c-(this.useFixedPosition?te.getDomNodePagePosition(this.view).top:d.top),"px"),this.view.style.left="".concat(u-(this.useFixedPosition?te.getDomNodePagePosition(this.view).left:d.left),"px"),this.view.style.width="initial"}}},{key:"hide",value:function(e){var t=this.delegate;this.delegate=null,(null===t||void 0===t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),te.hide(this.view)}},{key:"isVisible",value:function(){return!!this.delegate}},{key:"onDOMEvent",value:function(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!te.isAncestor(e.target,this.container)&&this.hide())}},{key:"dispose",value:function(){this.hide(),Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}}]),n}(Te.a);Zi.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Zi.BUBBLE_DOWN_EVENTS=["click"];var Xi,Ji='\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',eo=n(26),to=n(132),no=n(46),ro=n(77),io=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,oo=/(&)?(&)([^\s&])/g,ao=Object(eo.e)("menu-selection",eo.a.check),so=Object(eo.e)("menu-submenu",eo.a.chevronRight);!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Xi||(Xi={}));var lo=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(j.a)(this,n),Object(te.addClass)(e,"monaco-menu-container"),e.setAttribute("role","presentation");var a=document.createElement("div");Object(te.addClass)(a,"monaco-menu"),a.setAttribute("role","presentation"),(i=t.call(this,a,{orientation:2,actionViewItemProvider:function(e){return i.doGetActionViewItem(e,o,s)},context:o.context,actionRunner:o.actionRunner,ariaLabel:o.ariaLabel,triggerKeys:{keys:[3].concat(Object(ee.a)(Ne.f||Ne.d?[10]:[])),keyDown:!0}})).menuElement=a,i.actionsList.setAttribute("role","menu"),i.actionsList.tabIndex=0,i.menuDisposables=i._register(new Te.b),i.initializeStyleSheet(e),Object(te.addDisposableListener)(a,te.EventType.KEY_DOWN,(function(e){new un.a(e).equals(2)&&e.preventDefault()})),o.enableMnemonics&&i.menuDisposables.add(Object(te.addDisposableListener)(a,te.EventType.KEY_DOWN,(function(e){var t=e.key.toLocaleLowerCase();if(i.mnemonics.has(t)){te.EventHelper.stop(e,!0);var n=i.mnemonics.get(t);if(1===n.length&&(n[0]instanceof uo&&n[0].container&&i.focusItemByElement(n[0].container),n[0].onClick(e)),n.length>1){var r=n.shift();r&&r.container&&(i.focusItemByElement(r.container),n.push(r)),i.mnemonics.set(t,n)}}}))),Ne.d&&i._register(Object(te.addDisposableListener)(a,te.EventType.KEY_DOWN,(function(e){var t=new un.a(e);t.equals(14)||t.equals(11)?(i.focusedItem=i.viewItems.length-1,i.focusNext(),te.EventHelper.stop(e,!0)):(t.equals(13)||t.equals(12))&&(i.focusedItem=0,i.focusPrevious(),te.EventHelper.stop(e,!0))}))),i._register(Object(te.addDisposableListener)(i.domNode,te.EventType.MOUSE_OUT,(function(e){var t=e.relatedTarget;Object(te.isAncestor)(t,i.domNode)||(i.focusedItem=void 0,i.updateFocus(),e.stopPropagation())}))),i._register(Object(te.addDisposableListener)(i.actionsList,te.EventType.MOUSE_OVER,(function(e){var t=e.target;if(t&&Object(te.isAncestor)(t,i.actionsList)&&t!==i.actionsList){for(;t.parentElement!==i.actionsList&&null!==t.parentElement;)t=t.parentElement;if(Object(te.hasClass)(t,"action-item")){var n=i.focusedItem;i.setFocusedItem(t),n!==i.focusedItem&&i.updateFocus()}}})));var s={parent:Object(Gi.a)(i)};i.mnemonics=new Map,i.scrollableElement=i._register(new Ki.a(a,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));var l=i.scrollableElement.getDomNode();return l.style.position="",i._register(Object(te.addDisposableListener)(l,te.EventType.MOUSE_UP,(function(e){e.preventDefault()}))),a.style.maxHeight="".concat(Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35),"px"),r=r.filter((function(e){var t;return!(null===(t=o.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn("Found submenu cycle: ".concat(e.id)),!1)})),i.push(r,{icon:!0,label:!0,isMenu:!0}),e.appendChild(i.scrollableElement.getDomNode()),i.scrollableElement.scanDomNode(),i.viewItems.filter((function(e){return!(e instanceof ho)})).forEach((function(e,t,n){e.updatePositionInSet(t+1,n.length)})),i}return Object(F.a)(n,[{key:"initializeStyleSheet",value:function(e){Object(te.isInShadowDOM)(e)?(this.styleSheet=Object(te.createStyleSheet)(e),this.styleSheet.innerHTML=fo):(n.globalStyleSheet||(n.globalStyleSheet=Object(te.createStyleSheet)(),n.globalStyleSheet.innerHTML=fo),this.styleSheet=n.globalStyleSheet)}},{key:"style",value:function(e){var t=this.getContainer(),n=e.foregroundColor?"".concat(e.foregroundColor):"",r=e.backgroundColor?"".concat(e.backgroundColor):"",i=e.borderColor?"1px solid ".concat(e.borderColor):"",o=e.shadowColor?"0 2px 4px ".concat(e.shadowColor):"";t.style.border=i,this.domNode.style.color=n,this.domNode.style.backgroundColor=r,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach((function(t){(t instanceof co||t instanceof ho)&&t.style(e)}))}},{key:"getContainer",value:function(){return this.scrollableElement.getDomNode()}},{key:"focusItemByElement",value:function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}},{key:"setFocusedItem",value:function(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:{};if(Object(j.a)(this,n),o.isMenu=!0,(i=t.call(this,r,r,o)).options=o,i.options.icon=void 0!==o.icon&&o.icon,i.options.label=void 0===o.label||o.label,i.cssClass="",i.options.label&&o.enableMnemonics){var a=i.getAction().label;if(a){var s=io.exec(a);s&&(i.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}return i.runOnceToEnableMouseUp=new Oe.d((function(){i.element&&(i._register(Object(te.addDisposableListener)(i.element,te.EventType.MOUSE_UP,(function(e){if(te.EventHelper.stop(e,!0),no.h){if(new ro.a(e).rightButton)return;i.onClick(e)}setTimeout((function(){i.onClick(e)}),0)}))),i._register(Object(te.addDisposableListener)(i.element,te.EventType.CONTEXT_MENU,(function(e){te.EventHelper.stop(e,!0)}))))}),100),i._register(i.runOnceToEnableMouseUp),i}return Object(F.a)(n,[{key:"render",value:function(e){Object(Ee.a)(Object(we.a)(n.prototype),"render",this).call(this,e),this.element&&(this.container=e,this.item=Object(te.append)(this.element,Object(te.$)("a.action-menu-item")),this._action.id===Wi.c.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts","".concat(this.mnemonic))),this.check=Object(te.append)(this.item,Object(te.$)("span.menu-item-check"+ao.cssSelector)),this.check.setAttribute("role","none"),this.label=Object(te.append)(this.item,Object(te.$)("span.action-label")),this.options.label&&this.options.keybinding&&(Object(te.append)(this.item,Object(te.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}},{key:"blur",value:function(){Object(Ee.a)(Object(we.a)(n.prototype),"blur",this).call(this),this.applyStyle()}},{key:"focus",value:function(){Object(Ee.a)(Object(we.a)(n.prototype),"focus",this).call(this),this.item&&this.item.focus(),this.applyStyle()}},{key:"updatePositionInSet",value:function(e,t){this.item&&(this.item.setAttribute("aria-posinset","".concat(e)),this.item.setAttribute("aria-setsize","".concat(t)))}},{key:"updateLabel",value:function(){if(this.label&&this.options.label){Object(te.clearNode)(this.label);var e=Object(eo.h)(this.getAction().label);if(e){var t=function(e){var t=io,n=t.exec(e);if(!n)return e;var r=!n[1];return e.replace(t,r?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));var n=io.exec(e);if(n){e=Qe.u(e),oo.lastIndex=0;for(var r=oo.exec(e);r&&r[1];)r=oo.exec(e);var i=function(e){return e.replace(/&&/g,"&")};r?this.label.append(Qe.K(i(e.substr(0,r.index))," "),Object(te.$)("u",{"aria-hidden":"true"},r[3]),Qe.Q(i(e.substr(r.index+r[0].length))," ")):this.label.innerText=i(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}},{key:"updateTooltip",value:function(){var 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=En.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}},{key:"updateClass",value:function(){this.cssClass&&this.item&&Object(te.removeClasses)(this.item,this.cssClass),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",Object(te.addClass)(this.label,"icon"),this.cssClass&&Object(te.addClasses)(this.label,this.cssClass),this.updateEnabled()):this.label&&Object(te.removeClass)(this.label,"icon")}},{key:"updateEnabled",value:function(){this.getAction().enabled?(this.element&&Object(te.removeClass)(this.element,"disabled"),this.item&&(Object(te.removeClass)(this.item,"disabled"),this.item.tabIndex=0)):(this.element&&Object(te.addClass)(this.element,"disabled"),this.item&&(Object(te.addClass)(this.item,"disabled"),Object(te.removeTabIndexAndUpdateFocus)(this.item)))}},{key:"updateChecked",value:function(){this.item&&(this.getAction().checked?(Object(te.addClass)(this.item,"checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(Object(te.removeClass)(this.item,"checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}},{key:"getMnemonic",value:function(){return this.mnemonic}},{key:"applyStyle",value:function(){if(this.menuStyle){var e=this.element&&Object(te.hasClass)(this.element,"focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,n=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,r=e&&this.menuStyle.selectionBorderColor?"thin solid ".concat(this.menuStyle.selectionBorderColor):"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=n?n.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=r)}}},{key:"style",value:function(e){this.menuStyle=e,this.applyStyle()}}]),n}(to.b),uo=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o){var a;return Object(j.a)(this,n),(a=t.call(this,e,e,o)).submenuActions=r,a.parentData=i,a.submenuOptions=o,a.mysubmenu=null,a.submenuDisposables=a._register(new Te.b),a.mouseOver=!1,a.expandDirection=o&&void 0!==o.expandDirection?o.expandDirection:Xi.Right,a.showScheduler=new Oe.d((function(){a.mouseOver&&(a.cleanupExistingSubmenu(!1),a.createSubmenu(!1))}),250),a.hideScheduler=new Oe.d((function(){a.element&&!Object(te.isAncestor)(Object(te.getActiveElement)(),a.element)&&a.parentData.submenu===a.mysubmenu&&(a.parentData.parent.focus(!1),a.cleanupExistingSubmenu(!0))}),750),a}return Object(F.a)(n,[{key:"render",value:function(e){var t=this;Object(Ee.a)(Object(we.a)(n.prototype),"render",this).call(this,e),this.element&&(this.item&&(Object(te.addClass)(this.item,"monaco-submenu-item"),this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Object(te.append)(this.item,Object(te.$)("span.submenu-indicator"+so.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Object(te.addDisposableListener)(this.element,te.EventType.KEY_UP,(function(e){var n=new un.a(e);(n.equals(17)||n.equals(3))&&(te.EventHelper.stop(e,!0),t.createSubmenu(!0))}))),this._register(Object(te.addDisposableListener)(this.element,te.EventType.KEY_DOWN,(function(e){var n=new un.a(e);Object(te.getActiveElement)()===t.item&&(n.equals(17)||n.equals(3))&&te.EventHelper.stop(e,!0)}))),this._register(Object(te.addDisposableListener)(this.element,te.EventType.MOUSE_OVER,(function(e){t.mouseOver||(t.mouseOver=!0,t.showScheduler.schedule())}))),this._register(Object(te.addDisposableListener)(this.element,te.EventType.MOUSE_LEAVE,(function(e){t.mouseOver=!1}))),this._register(Object(te.addDisposableListener)(this.element,te.EventType.FOCUS_OUT,(function(e){t.element&&!Object(te.isAncestor)(Object(te.getActiveElement)(),t.element)&&t.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((function(){t.parentData.parent.focus(!1),t.cleanupExistingSubmenu(!1)}))))}},{key:"onClick",value:function(e){te.EventHelper.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}},{key:"cleanupExistingSubmenu",value:function(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)}}},{key:"calculateSubmenuMenuLayout",value:function(e,t,n,r){var i={top:0,left:0};return i.left=Qi(e.width,t.width,{position:r===Xi.Right?0:1,offset:n.left,size:n.width}),i.left>=n.left&&i.left0&&void 0!==arguments[0])||arguments[0];if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Object(te.append)(this.element,Object(te.$)("div.monaco-submenu")),Object(te.addClasses)(this.submenuContainer,"menubar-menu-items-holder","context-view");var n=getComputedStyle(this.parentData.parent.domNode),r=parseFloat(n.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 lo(this.submenuContainer,this.submenuActions,this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);var i=this.element.getBoundingClientRect(),o={top:i.top-r,left:i.left,height:i.height+2*r,width:i.width},a=this.submenuContainer.getBoundingClientRect(),s=this.calculateSubmenuMenuLayout({height:window.innerHeight,width:window.innerWidth},a,o,this.expandDirection),l=s.top,c=s.left;this.submenuContainer.style.left="".concat(c,"px"),this.submenuContainer.style.top="".concat(l,"px"),this.submenuDisposables.add(Object(te.addDisposableListener)(this.submenuContainer,te.EventType.KEY_UP,(function(t){new un.a(t).equals(15)&&(te.EventHelper.stop(t,!0),e.parentData.parent.focus(),e.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(Object(te.addDisposableListener)(this.submenuContainer,te.EventType.KEY_DOWN,(function(e){new un.a(e).equals(15)&&te.EventHelper.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((function(){e.parentData.parent.focus(),e.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(t),this.mysubmenu=this.parentData.submenu}}},{key:"updateAriaExpanded",value:function(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}},{key:"applyStyle",value:function(){if(Object(Ee.a)(Object(we.a)(n.prototype),"applyStyle",this).call(this),this.menuStyle){var e=this.element&&Object(te.hasClass)(this.element,"focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?"".concat(e):""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}}},{key:"dispose",value:function(){Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}]),n}(co),ho=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){return Object(j.a)(this,n),t.apply(this,arguments)}return Object(F.a)(n,[{key:"style",value:function(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?"".concat(e.separatorColor):"")}}]),n}(to.a);var fo="\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n".concat(Object(yi.b)(ao),"\n").concat(Object(yi.b)(so),"\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 = \u221a\u03c6 */\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"),po=n(97),go=n(52),mo=function(){function e(t,n,r,i,o){Object(j.a)(this,e),this.contextViewService=t,this.telemetryService=n,this.notificationService=r,this.keybindingService=i,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}return Object(F.a)(e,[{key:"configure",value:function(e){this.options=e}},{key:"showContextMenu",value:function(e){var t=this,n=e.getActions();if(n.length){var r;this.focusToReturn=document.activeElement;var i=Object(te.isHTMLElement)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,anchorAlignment:e.anchorAlignment,render:function(i){var o=e.getMenuClassName?e.getMenuClassName():"";o&&(i.className+=" "+o),t.options.blockMouse&&(t.block=i.appendChild(Object(te.$)(".context-view-block")),t.block.style.position="fixed",t.block.style.cursor="initial",t.block.style.left="0",t.block.style.top="0",t.block.style.width="100%",t.block.style.height="100%",t.block.style.zIndex="-1",Object(go.a)(t.block,te.EventType.MOUSE_DOWN)((function(e){return e.stopPropagation()})));var a=new Te.b,s=e.actionRunner||new Wi.b;return s.onDidBeforeRun(t.onActionRun,t,a),s.onDidRun(t.onDidActionRun,t,a),r=new lo(i,n,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:function(e){return t.keybindingService.lookupKeybinding(e.id)}}),a.add(Object(po.c)(r,t.themeService)),r.onDidCancel((function(){return t.contextViewService.hideContextView(!0)}),null,a),r.onDidBlur((function(){return t.contextViewService.hideContextView(!0)}),null,a),Object(go.a)(window,te.EventType.BLUR)((function(){t.contextViewService.hideContextView(!0)}),null,a),Object(go.a)(window,te.EventType.MOUSE_DOWN)((function(e){if(!e.defaultPrevented){var n=new ro.a(e),r=n.target;if(!n.rightButton){for(;r;){if(r===i)return;r=r.parentElement}t.contextViewService.hideContextView(!0)}}}),null,a),Object(Te.e)(a,r)},focus:function(){r&&r.focus(!!e.autoSelectFirstItem)},onHide:function(n){e.onHide&&e.onHide(!!n),t.block&&(Object(te.removeNode)(t.block),t.block=null),t.focusToReturn&&t.focusToReturn.focus()}},i,!!i)}}},{key:"onActionRun",value:function(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}},{key:"onDidActionRun",value:function(e){e.error&&this.notificationService&&this.notificationService.error(e.error)}}]),e}(),vo=n(128),_o=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},bo=function(e,t){return function(n,r){t(n,r,e)}},yo=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o,a){var s;return Object(j.a)(this,n),(s=t.call(this))._onDidContextMenu=s._register(new U.a),s.onDidContextMenu=s._onDidContextMenu.event,s.contextMenuHandler=new mo(i,e,r,o,a),s}return Object(F.a)(n,[{key:"configure",value:function(e){this.contextMenuHandler.configure(e)}},{key:"showContextMenu",value:function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()}}]),n}(Te.a);yo=_o([bo(0,vo.a),bo(1,Pn.a),bo(2,hr.b),bo(3,pr.a),bo(4,gr.c)],yo);var So=Object(fr.c)("layoutService"),Co=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ko=function(e,t){return function(n,r){t(n,r,e)}},Eo=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this)).layoutService=e,r.currentViewDisposable=Te.a.None,r.container=e.container,r.contextView=r._register(new Zi(r.container,1)),r.layout(),r._register(e.onLayout((function(){return r.layout()}))),r}return Object(F.a)(n,[{key:"setContainer",value:function(e,t){this.contextView.setContainer(e,t||1)}},{key:"showContextView",value:function(e,t,n){var r=this;t?t!==this.container&&(this.container=t,this.setContainer(t,n?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);var i=Object(Te.h)((function(){r.currentViewDisposable===i&&r.hideContextView()}));return this.currentViewDisposable=i,i}},{key:"getContextViewElement",value:function(){return this.contextView.getViewElement()}},{key:"layout",value:function(){this.contextView.layout()}},{key:"hideContextView",value:function(e){this.contextView.hide(e)}}]),n}(Te.a);Eo=Co([ko(0,So)],Eo);var wo=n(212),Oo=n(267),To=n(164),xo=function e(t){Object(j.a)(this,e),this.incoming=new Map,this.outgoing=new Map,this.data=t},No=function(){function e(t){Object(j.a)(this,e),this._hashFn=t,this._nodes=new Map}return Object(F.a)(e,[{key:"roots",value:function(){var e,t=[],n=Object(Z.a)(this._nodes.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;0===r.outgoing.size&&t.push(r)}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"insertEdge",value:function(e,t){var n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing.set(this._hashFn(t),r),r.incoming.set(this._hashFn(e),n)}},{key:"removeNode",value:function(e){var t=this._hashFn(e);this._nodes.delete(t);var n,r=Object(Z.a)(this._nodes.values());try{for(r.s();!(n=r.n()).done;){var i=n.value;i.outgoing.delete(t),i.incoming.delete(t)}}catch(o){r.e(o)}finally{r.f()}}},{key:"lookupOrInsertNode",value:function(e){var t=this._hashFn(e),n=this._nodes.get(t);return n||(n=new xo(e),this._nodes.set(t,n)),n}},{key:"isEmpty",value:function(){return 0===this._nodes.size}},{key:"toString",value:function(){var e,t=[],n=Object(Z.a)(this._nodes);try{for(n.s();!(e=n.n()).done;){var r=Object(He.a)(e.value,2),i=r[0],o=r[1];t.push("".concat(i,", (incoming)[").concat(Object(ee.a)(o.incoming.keys()).join(", "),"], (outgoing)[").concat(Object(ee.a)(o.outgoing.keys()).join(","),"]"))}}catch(a){n.e(a)}finally{n.f()}return t.join("\n")}}]),e}(),Do=n(191),Lo=n(166),Ao=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this,"cyclic dependency between services")).message=e.toString(),r}return n}(Object(To.a)(Error)),Io=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Lo.a,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;Object(j.a)(this,e),this._services=t,this._strict=n,this._parent=r,this._services.set(fr.a,this)}return Object(F.a)(e,[{key:"createChild",value:function(t){return new e(t,this._strict,this)}},{key:"invokeFunction",value:function(e){var t=this,n=Ro.traceInvocation(e),r=!1;try{for(var i={get:function(e,i){if(r)throw Object(xe.c)("service accessor is only valid during the invocation of its target method");var o=t._getOrCreateServiceInstance(e,n);if(!o&&i!==fr.d)throw new Error("[invokeFunction] unknown service '".concat(e,"'"));return o}},o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=fr.b.getServiceDependencies(e).sort((function(e,t){return e.index-t.index})),o=[],a=Object(Z.a)(i);try{for(a.s();!(t=a.n()).done;){var s=t.value,l=this._getOrCreateServiceInstance(s.id,r);if(!l&&this._strict&&!s.optional)throw new Error("[createInstance] ".concat(e.name," depends on UNKNOWN service ").concat(s.id,"."));o.push(l)}}catch(d){a.e(d)}finally{a.f()}var c=i.length>0?i[0].index:n.length;if(n.length!==c){console.warn("[createInstance] First service dependency of ".concat(e.name," at position ").concat(c+1," conflicts with ").concat(n.length," static arguments"));var u=c-n.length;n=u>0?n.concat(new Array(u)):n.slice(0,c)}return Object(Oo.a)(e,[].concat(Object(ee.a)(n),o))}},{key:"_setServiceInstance",value:function(e,t){if(this._services.get(e)instanceof Do.a)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}},{key:"_getServiceInstanceOrDescriptor",value:function(e){var t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}},{key:"_getOrCreateServiceInstance",value:function(e,t){var n=this._getServiceInstanceOrDescriptor(e);return n instanceof Do.a?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}},{key:"_createAndCacheServiceInstance",value:function(e,t,n){for(var r=new No((function(e){return e.id.toString()})),i=0,o=[{id:e,desc:t,_trace:n}];o.length;){var a=o.pop();if(r.lookupOrInsertNode(a),i++>1e3)throw new Ao(r);var s,l=Object(Z.a)(fr.b.getServiceDependencies(a.desc.ctor));try{for(l.s();!(s=l.n()).done;){var c=s.value,u=this._getServiceInstanceOrDescriptor(c.id);if(u||c.optional||console.warn("[createInstance] ".concat(e," depends on ").concat(c.id," which is NOT registered.")),u instanceof Do.a){var d={id:c.id,desc:u,_trace:a._trace.branch(c.id,!0)};r.insertEdge(a,d),o.push(d)}}}catch(v){l.e(v)}finally{l.f()}}for(;;){var h=r.roots();if(0===h.length){if(!r.isEmpty())throw new Ao(r);break}var f,p=Object(Z.a)(h);try{for(p.s();!(f=p.n()).done;){var g=f.value.data,m=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,m),r.removeNode(g)}}catch(v){p.e(v)}finally{p.f()}}return this._getServiceInstanceOrDescriptor(e)}},{key:"_createServiceInstanceWithOwner",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(this._services.get(e)instanceof Do.a)return this._createServiceInstance(t,n,r,i);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,r,i);throw new Error("illegalState - creating UNKNOWN service instance ".concat(t.name))}},{key:"_createServiceInstance",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(r){var o=new Oe.b((function(){return t._createInstance(e,n,i)}));return new Proxy(Object.create(null),{get:function(e,t){if(t in e)return e[t];var n=o.value,r=n[t];return"function"!==typeof r||(r=r.bind(n),e[t]=r),r},set:function(e,t,n){return o.value[t]=n,!0}})}return this._createInstance(e,n,i)}}]),e}(),Ro=function(){function e(t,n){Object(j.a)(this,e),this.type=t,this.name=n,this._start=Date.now(),this._dep=[]}return Object(F.a)(e,[{key:"branch",value:function(t,n){var r=new e(2,t.toString());return this._dep.push([t,n,r]),r}},{key:"stop",value:function(){var t=Date.now()-this._start;e._totals+=t;var n=!1;var r=["".concat(0===this.type?"CREATE":"CALL"," ").concat(this.name),"".concat(function e(t,r){var i,o=[],a=new Array(t+1).join("\t"),s=Object(Z.a)(r._dep);try{for(s.s();!(i=s.n()).done;){var l=Object(He.a)(i.value,3),c=l[0],u=l[1],d=l[2];if(u&&d){n=!0,o.push("".concat(a,"CREATES -> ").concat(c));var h=e(t+1,d);h&&o.push(h)}else o.push("".concat(a,"uses -> ").concat(c))}}catch(f){s.e(f)}finally{s.f()}return o.join("\n")}(1,this)),"DONE, took ".concat(t.toFixed(2),"ms (grand total ").concat(e._totals.toFixed(2),"ms)")];(t>2||n)&&console.log(r.join("\n"))}}],[{key:"traceInvocation",value:function(t){return e._None}},{key:"traceCreation",value:function(t){return e._None}}]),e}();Ro._None=new(function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(){return Object(j.a)(this,n),t.call(this,-1,null)}return Object(F.a)(n,[{key:"stop",value:function(){}},{key:"branch",value:function(){return this}}]),n}(Ro)),Ro._totals=0;var Mo=n(187),Po=n(148),jo=n(72),Fo=n(55),Bo=function(){function e(){Object(j.a)(this,e),this._byResource=new vn.b,this._byOwner=new Map}return Object(F.a)(e,[{key:"set",value:function(e,t,n){var r=this._byResource.get(e);r||(r=new Map,this._byResource.set(e,r)),r.set(t,n);var i=this._byOwner.get(t);i||(i=new vn.b,this._byOwner.set(t,i)),i.set(e,n)}},{key:"get",value:function(e,t){var n=this._byResource.get(e);return null===n||void 0===n?void 0:n.get(t)}},{key:"delete",value:function(e,t){var n=!1,r=!1,i=this._byResource.get(e);i&&(n=i.delete(t));var o=this._byOwner.get(t);if(o&&(r=o.delete(e)),n!==r)throw new Error("illegal state");return n&&r}},{key:"values",value:function(e){var t,n,r,i;return"string"===typeof e?null!==(n=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==n?n:Fo.a.empty():z.a.isUri(e)?null!==(i=null===(r=this._byResource.get(e))||void 0===r?void 0:r.values())&&void 0!==i?i:Fo.a.empty():Fo.a.map(Fo.a.concat.apply(Fo.a,Object(ee.a)(this._byOwner.values())),(function(e){return e[1]}))}}]),e}(),Uo=function(){function e(t){Object(j.a)(this,e),this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new vn.b,this._service=t,this._subscription=t.onMarkerChanged(this._update,this)}return Object(F.a)(e,[{key:"dispose",value:function(){this._subscription.dispose()}},{key:"_update",value:function(e){var t,n=Object(Z.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=this._data.get(r);i&&this._substract(i);var o=this._resourceStats(r);this._add(o),this._data.set(r,o)}}catch(a){n.e(a)}finally{n.f()}}},{key:"_resourceStats",value:function(e){var t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===ie.b.inMemory||e.scheme===ie.b.walkThrough||e.scheme===ie.b.walkThroughSnippet)return t;var n,r=Object(Z.a)(this._service.read({resource:e}));try{for(r.s();!(n=r.n()).done;){var i=n.value.severity;i===jo.c.Error?t.errors+=1:i===jo.c.Warning?t.warnings+=1:i===jo.c.Info?t.infos+=1:t.unknowns+=1}}catch(o){r.e(o)}finally{r.f()}return t}},{key:"_substract",value:function(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}},{key:"_add",value:function(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}]),e}(),Ho=function(){function e(){Object(j.a)(this,e),this._onMarkerChanged=new U.a,this.onMarkerChanged=U.b.debounce(this._onMarkerChanged.event,e._debouncer,0),this._data=new Bo,this._stats=new Uo(this)}return Object(F.a)(e,[{key:"dispose",value:function(){this._stats.dispose()}},{key:"remove",value:function(e,t){var n,r=Object(Z.a)(t||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.changeOne(e,i,[])}}catch(o){r.e(o)}finally{r.f()}}},{key:"changeOne",value:function(t,n,r){if(Object(Ue.n)(r)){this._data.delete(n,t)&&this._onMarkerChanged.fire([n])}else{var i,o=[],a=Object(Z.a)(r);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=e._toMarker(t,n,s);l&&o.push(l)}}catch(c){a.e(c)}finally{a.f()}this._data.set(n,t,o),this._onMarkerChanged.fire([n])}}},{key:"read",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.create(null),n=t.owner,r=t.resource,i=t.severities,o=t.take;if((!o||o<0)&&(o=-1),n&&r){var a=this._data.get(r,n);if(a){var s,l=[],c=Object(Z.a)(a);try{for(c.s();!(s=c.n()).done;){var u=s.value;if(e._accept(u,i)){var d=l.push(u);if(o>0&&d===o)break}}}catch(N){c.e(N)}finally{c.f()}return l}return[]}if(n||r){var h,f=this._data.values(null!==r&&void 0!==r?r:n),p=[],g=Object(Z.a)(f);try{for(g.s();!(h=g.n()).done;){var m,v=h.value,_=Object(Z.a)(v);try{for(_.s();!(m=_.n()).done;){var b=m.value;if(e._accept(b,i)){var y=p.push(b);if(o>0&&y===o)return p}}}catch(N){_.e(N)}finally{_.f()}}}catch(N){g.e(N)}finally{g.f()}return p}var S,C=[],k=Object(Z.a)(this._data.values());try{for(k.s();!(S=k.n()).done;){var E,w=S.value,O=Object(Z.a)(w);try{for(O.s();!(E=O.n()).done;){var T=E.value;if(e._accept(T,i)){var x=C.push(T);if(o>0&&x===o)return C}}}catch(N){O.e(N)}finally{O.f()}}}catch(N){k.e(N)}finally{k.f()}return C}}],[{key:"_toMarker",value:function(e,t,n){var r=n.code,i=n.severity,o=n.message,a=n.source,s=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,u=n.endColumn,d=n.relatedInformation,h=n.tags;if(o)return{resource:t,owner:e,code:r,severity:i,message:o,source:a,startLineNumber:s=s>0?s:1,startColumn:l=l>0?l:1,endLineNumber:c=c>=s?c:s,endColumn:u=u>0?u:l,relatedInformation:d,tags:h}}},{key:"_accept",value:function(e,t){return void 0===t||(t&e.severity)===e.severity}},{key:"_debouncer",value:function(t,n){t||(e._dedupeMap=new vn.b,t=[]);var r,i=Object(Z.a)(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;e._dedupeMap.has(o)||(e._dedupeMap.set(o,!0),t.push(o))}}catch(a){i.e(a)}finally{i.f()}return t}}]),e}(),zo=n(103),Vo=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Wo=function(e,t){return function(n,r){t(n,r,e)}},Go=function(){function e(t){Object(j.a)(this,e),this._commandService=t}return Object(F.a)(e,[{key:"createMenu",value:function(e,t){return new qo(e,this._commandService,t,this)}}]),e}();Go=Vo([Wo(0,ae.b)],Go);var qo=function(){function e(t,n,r,i){var o=this;Object(j.a)(this,e),this._id=t,this._commandService=n,this._contextKeyService=r,this._menuService=i,this._onDidChange=new U.a,this._dispoables=new Te.b,this._menuGroups=[],this._contextKeys=new Set,this._build(),this._dispoables.add(U.b.debounce(U.b.filter(ur.d.onDidChangeMenu,(function(e){return e.has(o._id)})),(function(){}),50)(this._build,this)),this._dispoables.add(U.b.debounce(this._contextKeyService.onDidChangeContext,(function(e,t){return e||t.affectsSome(o._contextKeys)}),50)((function(e){return e&&o._onDidChange.fire(void 0)}),this))}return Object(F.a)(e,[{key:"dispose",value:function(){this._dispoables.dispose(),this._onDidChange.dispose()}},{key:"_build",value:function(){this._menuGroups.length=0,this._contextKeys.clear();var t,n=ur.d.getMenuItems(this._id);n.sort(e._compareMenuItems);var r,i=Object(Z.a)(n);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.group||"";if(t&&t[0]===a||(t=[a,[]],this._menuGroups.push(t)),t[1].push(o),e._fillInKbExprKeys(o.when,this._contextKeys),Object(ur.f)(o)&&o.command.precondition&&e._fillInKbExprKeys(o.command.precondition,this._contextKeys),Object(ur.f)(o)&&o.command.toggled){var s=o.command.toggled.condition||o.command.toggled;e._fillInKbExprKeys(s,this._contextKeys)}}}catch(l){i.e(l)}finally{i.f()}this._onDidChange.fire(this)}},{key:"getActions",value:function(e){var t,n=[],r=Object(Z.a)(this._menuGroups);try{for(r.s();!(t=r.n()).done;){var i,o=t.value,a=Object(He.a)(o,2),s=a[0],l=a[1],c=[],u=Object(Z.a)(l);try{for(u.s();!(i=u.n()).done;){var d=i.value;if(this._contextKeyService.contextMatchesRules(d.when)){var h=Object(ur.f)(d)?new ur.c(d.command,d.alt,e,this._contextKeyService,this._commandService):new ur.e(d,this._menuService,this._contextKeyService,e);c.push(h)}}}catch(f){u.e(f)}finally{u.f()}c.length>0&&n.push([s,c])}}catch(f){r.e(f)}finally{r.f()}return n}},{key:"onDidChange",get:function(){return this._onDidChange.event}}],[{key:"_fillInKbExprKeys",value:function(e,t){if(e){var n,r=Object(Z.a)(e.keys());try{for(r.s();!(n=r.n()).done;){var i=n.value;t.add(i)}}catch(o){r.e(o)}finally{r.f()}}}},{key:"_compareMenuItems",value:function(t,n){var r=t.group,i=n.group;if(r!==i){if(!r)return 1;if(!i)return-1;if("navigation"===r)return-1;if("navigation"===i)return 1;var o=r.localeCompare(i);if(0!==o)return o}var a=t.order||0,s=n.order||0;return as?1:e._compareTitles(Object(ur.f)(t)?t.command.title:t.title,Object(ur.f)(n)?n.command.title:n.title)}},{key:"_compareTitles",value:function(e,t){var n="string"===typeof e?e:e.value,r="string"===typeof t?t:t.value;return n.localeCompare(r)}}]),e}();qo=Vo([Wo(1,ae.b),Wo(2,dr.b),Wo(3,ur.a)],qo);var Ko=n(274),Yo=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},$o=function(e,t){return function(n,r){t(n,r,e)}};function Qo(e){return e.toString()}var Zo=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this)).model=e,r._markersData=new Map,r._register(Object(Te.h)((function(){r.model.deltaDecorations(Object(ee.a)(r._markersData.keys()),[]),r._markersData.clear()}))),r}return Object(F.a)(n,[{key:"update",value:function(e,t){var n=Object(ee.a)(this._markersData.keys());this._markersData.clear();for(var r=this.model.deltaDecorations(n,t),i=0;i=i?new W.a(n.startLineNumber,i-1,n.endLineNumber,i):new W.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var o=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);o=0}}]),n}(Te.a);Xo=Yo([$o(0,Ct.a),$o(1,jo.b)],Xo);var Jo=n(121),ea=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ta=function(e,t){return function(n,r){t(n,r,e)}},na=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;Object(j.a)(this,n),(i=t.call(this))._contextKeyService=e,i._configurationService=r,i._accessibilitySupport=0,i._onDidChangeScreenReaderOptimized=new U.a,i._accessibilityModeEnabledContext=mr.a.bindTo(i._contextKeyService);var o=function(){return i._accessibilityModeEnabledContext.set(i.isScreenReaderOptimized())};return i._register(i._configurationService.onDidChangeConfiguration((function(e){e.affectsConfiguration("editor.accessibilitySupport")&&(o(),i._onDidChangeScreenReaderOptimized.fire())}))),o(),i.onDidChangeScreenReaderOptimized((function(){return o()})),i}return Object(F.a)(n,[{key:"isScreenReaderOptimized",value:function(){var e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}},{key:"getAccessibilitySupport",value:function(){return this._accessibilitySupport}},{key:"onDidChangeScreenReaderOptimized",get:function(){return this._onDidChangeScreenReaderOptimized.event}}]),n}(Te.a);na=ea([ta(0,dr.b),ta(1,mn.a)],na);var ra=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ia=function(){function e(){Object(j.a)(this,e),this.mapTextToType=new Map,this.findText=""}return Object(F.a)(e,[{key:"writeText",value:function(e,t){return ra(this,void 0,void 0,J.a.mark((function n(){var r,i;return J.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=3;break}return this.mapTextToType.set(t,e),n.abrupt("return");case 3:return n.prev=3,n.next=6,navigator.clipboard.writeText(e);case 6:return n.abrupt("return",n.sent);case 9:n.prev=9,n.t0=n.catch(3),console.error(n.t0);case 12:return r=document.activeElement,(i=document.body.appendChild(Object(te.$)("textarea",{"aria-hidden":!0}))).style.height="1px",i.style.width="1px",i.style.position="absolute",i.value=e,i.focus(),i.select(),document.execCommand("copy"),r instanceof HTMLElement&&r.focus(),document.body.removeChild(i),n.abrupt("return");case 24:case"end":return n.stop()}}),n,this,[[3,9]])})))}},{key:"readText",value:function(e){return ra(this,void 0,void 0,J.a.mark((function t(){return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=2;break}return t.abrupt("return",this.mapTextToType.get(e)||"");case 2:return t.prev=2,t.next=5,navigator.clipboard.readText();case 5:return t.abrupt("return",t.sent);case 8:return t.prev=8,t.t0=t.catch(2),console.error(t.t0),t.abrupt("return","");case 12:case"end":return t.stop()}}),t,this,[[2,8]])})))}},{key:"readFindText",value:function(){return ra(this,void 0,void 0,J.a.mark((function e(){return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.findText);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"writeFindText",value:function(e){return ra(this,void 0,void 0,J.a.mark((function t(){return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.findText=e;case 1:case"end":return t.stop()}}),t,this)})))}}]),e}(),oa=n(167),aa=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},sa=function(e,t){return function(n,r){t(n,r,e)}},la=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ca=!1;function ua(e){return e.scheme===ie.b.file?e.fsPath:e.path}var da=0,ha=function(){function e(t,n,r){Object(j.a)(this,e),this.id=++da,this.type=0,this.actual=t,this.label=t.label,this.resourceLabel=n,this.strResource=r,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.isValid=!0}return Object(F.a)(e,[{key:"setValid",value:function(e){this.isValid=e}},{key:"toString",value:function(){return"[".concat(this.id,"] [").concat(this.isValid?"VALID":"INVALID","] ").concat(this.actual)}}]),e}(),fa=function e(t,n){Object(j.a)(this,e),this.resourceLabel=t,this.reason=n},pa=function(){function e(){Object(j.a)(this,e),this.elements=new Map}return Object(F.a)(e,[{key:"createMessage",value:function(){var e,t=[],n=[],r=Object(Z.a)(this.elements);try{for(r.s();!(e=r.n()).done;){var i=Object(He.a)(e.value,2)[1];(0===i.reason?t:n).push(i.resourceLabel)}}catch(a){r.e(a)}finally{r.f()}var o=[];return t.length>0&&o.push(En.a({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",t.join(", "))),n.length>0&&o.push(En.a({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",n.join(", "))),o.join("\n")}},{key:"has",value:function(e){return this.elements.has(e)}},{key:"set",value:function(e,t){this.elements.set(e,t)}},{key:"delete",value:function(e){return this.elements.delete(e)}},{key:"size",get:function(){return this.elements.size}}]),e}(),ga=function(){function e(t,n,r){Object(j.a)(this,e),this.id=++da,this.type=1,this.actual=t,this.label=t.label,this.resourceLabels=n,this.strResources=r,this.removedResources=null,this.invalidatedResources=null}return Object(F.a)(e,[{key:"canSplit",value:function(){return"function"===typeof this.actual.split}},{key:"removeResource",value:function(e,t,n){this.removedResources||(this.removedResources=new pa),this.removedResources.has(t)||this.removedResources.set(t,new fa(e,n))}},{key:"setValid",value:function(e,t,n){n?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new pa),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new fa(e,0)))}},{key:"toString",value:function(){return"[".concat(this.id,"] [").concat(this.invalidatedResources?"INVALID":"VALID","] ").concat(this.actual)}}]),e}(),ma=function(){function e(t,n){Object(j.a)(this,e),this.resourceLabel=t,this.strResource=n,this._past=[],this._future=[],this.locked=!1,this.versionId=1}return Object(F.a)(e,[{key:"dispose",value:function(){var e,t=Object(Z.a)(this._past);try{for(t.s();!(e=t.n()).done;){var n=e.value;1===n.type&&n.removeResource(this.resourceLabel,this.strResource,0)}}catch(a){t.e(a)}finally{t.f()}var r,i=Object(Z.a)(this._future);try{for(i.s();!(r=i.n()).done;){var o=r.value;1===o.type&&o.removeResource(this.resourceLabel,this.strResource,0)}}catch(a){i.e(a)}finally{i.f()}this.versionId++}},{key:"toString",value:function(){var e=[];e.push("* ".concat(this.strResource,":"));for(var t=0;t=0;n--)e.push(" * [REDO] ".concat(this._future[n]));return e.join("\n")}},{key:"flushAllElements",value:function(){this._past=[],this._future=[],this.versionId++}},{key:"_setElementValidFlag",value:function(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}},{key:"setElementsValidFlag",value:function(e,t){var n,r=Object(Z.a)(this._past);try{for(r.s();!(n=r.n()).done;){var i=n.value;t(i.actual)&&this._setElementValidFlag(i,e)}}catch(l){r.e(l)}finally{r.f()}var o,a=Object(Z.a)(this._future);try{for(a.s();!(o=a.n()).done;){var s=o.value;t(s.actual)&&this._setElementValidFlag(s,e)}}catch(l){a.e(l)}finally{a.f()}}},{key:"pushElement",value:function(e){var t,n=Object(Z.a)(this._future);try{for(n.s();!(t=n.n()).done;){var r=t.value;1===r.type&&r.removeResource(this.resourceLabel,this.strResource,1)}}catch(o){n.e(o)}finally{n.f()}if(this._future=[],this._past.length>0){var i=this._past[this._past.length-1];0!==i.type||i.isValid||(this._past=[])}this._past.push(e),this.versionId++}},{key:"createSnapshot",value:function(e){for(var t=[],n=0,r=this._past.length;n=0;i--)t.push(this._future[i].id);return new oa.b(e,t)}},{key:"restoreSnapshot",value:function(e){for(var t=e.elements.length,n=!0,r=0,i=-1,o=0,a=this._past.length;o=t||s.id!==e.elements[r])&&(n=!1,i=0),n||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}for(var l=-1,c=this._future.length-1;c>=0;c--,r++){var u=this._future[c];n&&(r>=t||u.id!==e.elements[r])&&(n=!1,l=c),n||1!==u.type||u.removeResource(this.resourceLabel,this.strResource,0)}-1!==i&&(this._past=this._past.slice(0,i)),-1!==l&&(this._future=this._future.slice(l+1)),this.versionId++}},{key:"getElements",value:function(){var e,t=[],n=[],r=Object(Z.a)(this._past);try{for(r.s();!(e=r.n()).done;){var i=e.value;t.push(i.actual)}}catch(l){r.e(l)}finally{r.f()}var o,a=Object(Z.a)(this._future);try{for(a.s();!(o=a.n()).done;){var s=o.value;n.push(s.actual)}}catch(l){a.e(l)}finally{a.f()}return{past:t,future:n}}},{key:"getClosestPastElement",value:function(){return 0===this._past.length?null:this._past[this._past.length-1]}},{key:"getClosestFutureElement",value:function(){return 0===this._future.length?null:this._future[this._future.length-1]}},{key:"hasPastElements",value:function(){return this._past.length>0}},{key:"hasFutureElements",value:function(){return this._future.length>0}},{key:"splitPastWorkspaceElement",value:function(e,t){for(var n=this._past.length-1;n>=0;n--)if(this._past[n]===e){t.has(this.strResource)?this._past[n]=t.get(this.strResource):this._past.splice(n,1);break}this.versionId++}},{key:"splitFutureWorkspaceElement",value:function(e,t){for(var n=this._future.length-1;n>=0;n--)if(this._future[n]===e){t.has(this.strResource)?this._future[n]=t.get(this.strResource):this._future.splice(n,1);break}this.versionId++}},{key:"moveBackward",value:function(e){this._past.pop(),this._future.push(e),this.versionId++}},{key:"moveForward",value:function(e){this._future.pop(),this._past.push(e),this.versionId++}}]),e}(),va=function(){function e(t){Object(j.a)(this,e),this.editStacks=t,this._versionIds=[];for(var n=0,r=this.editStacks.length;n3&&void 0!==arguments[3]?arguments[3]:Te.a.None,a=this._acquireLocks(n);try{r=t()}catch(s){return a(),o.dispose(),this._onError(s,e)}if(r)return r.then((function(){a(),o.dispose()}),(function(t){return a(),o.dispose(),i._onError(t,e)}));a(),o.dispose()}},{key:"_invokeWorkspacePrepare",value:function(e){return la(this,void 0,void 0,J.a.mark((function t(){var n;return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!==typeof e.actual.prepareUndoRedo){t.next=2;break}return t.abrupt("return",Te.a.None);case 2:if("undefined"!==typeof(n=e.actual.prepareUndoRedo())){t.next=5;break}return t.abrupt("return",Te.a.None);case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})))}},{key:"_invokeResourcePrepare",value:function(e,t){if(1===e.actual.type&&"undefined"!==typeof e.actual.prepareUndoRedo){var n=e.actual.prepareUndoRedo();if(n){if(!Object(Te.g)(n))return n.then((function(e){t(e)}));t(n)}else t(Te.a.None)}else t(Te.a.None)}},{key:"_getAffectedEditStacks",value:function(e){var t,n=[],r=Object(Z.a)(e.strResources);try{for(r.s();!(t=r.n()).done;){var i=t.value;n.push(this._editStacks.get(i)||_a)}}catch(o){r.e(o)}finally{r.f()}return new va(n)}},{key:"_tryToSplitAndUndo",value:function(e,t,n,r){if(t.canSplit())return this._splitPastWorkspaceElement(t,n),this._notificationService.info(r),new ya(this.undo(e));var i,o=Object(Z.a)(t.strResources);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.removeElements(a)}}catch(s){o.e(s)}finally{o.f()}return this._notificationService.info(r),new ya}},{key:"_checkWorkspaceUndo",value:function(e,t,n,r){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,En.a({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(r&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,En.a({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()));var i,o=[],a=Object(Z.a)(n.editStacks);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.getClosestPastElement()!==t&&o.push(s.resourceLabel)}}catch(h){a.e(h)}finally{a.f()}if(o.length>0)return this._tryToSplitAndUndo(e,t,null,En.a({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,o.join(", ")));var l,c=[],u=Object(Z.a)(n.editStacks);try{for(u.s();!(l=u.n()).done;){var d=l.value;d.locked&&c.push(d.resourceLabel)}}catch(h){u.e(h)}finally{u.f()}return c.length>0?this._tryToSplitAndUndo(e,t,null,En.a({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,c.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(e,t,null,En.a({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))}},{key:"_workspaceUndo",value:function(e,t){var n=this._getAffectedEditStacks(t),r=this._checkWorkspaceUndo(e,t,n,!1);return r?r.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n)}},{key:"_confirmAndExecuteWorkspaceUndo",value:function(e,t,n){return la(this,void 0,void 0,J.a.mark((function r(){var i,o,a,s,l,c;return J.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t.canSplit()){r.next=12;break}return r.next=3,this._dialogService.show(dn.a.Info,En.a("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[En.a({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",n.editStacks.length),En.a("nok","Undo this File"),En.a("cancel","Cancel")],{cancelId:2});case 3:if(2!==(i=r.sent).choice){r.next=6;break}return r.abrupt("return");case 6:if(1!==i.choice){r.next=9;break}return this._splitPastWorkspaceElement(t,null),r.abrupt("return",this.undo(e));case 9:if(!(o=this._checkWorkspaceUndo(e,t,n,!1))){r.next=12;break}return r.abrupt("return",o.returnValue);case 12:return r.prev=12,r.next=15,this._invokeWorkspacePrepare(t);case 15:a=r.sent,r.next=21;break;case 18:return r.prev=18,r.t0=r.catch(12),r.abrupt("return",this._onError(r.t0,t));case 21:if(!(s=this._checkWorkspaceUndo(e,t,n,!0))){r.next=25;break}return a.dispose(),r.abrupt("return",s.returnValue);case 25:l=Object(Z.a)(n.editStacks);try{for(l.s();!(c=l.n()).done;)c.value.moveBackward(t)}catch(u){l.e(u)}finally{l.f()}return r.abrupt("return",this._safeInvokeWithLocks(t,(function(){return t.actual.undo()}),n,a));case 28:case"end":return r.stop()}}),r,this,[[12,18]])})))}},{key:"_resourceUndo",value:function(e,t){var n=this;if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(function(r){return e.moveBackward(t),n._safeInvokeWithLocks(t,(function(){return t.actual.undo()}),new va([e]),r)}));var r=En.a({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(r)}else e.flushAllElements()}},{key:"undo",value:function(e){var t="string"===typeof e?e:this.getUriComparisonKey(e);if(this._editStacks.has(t)){var n=this._editStacks.get(t),r=n.getClosestPastElement();if(r)try{return 1===r.type?this._workspaceUndo(t,r):this._resourceUndo(n,r)}finally{ca}}}},{key:"canRedo",value:function(e){var t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasFutureElements()}},{key:"_tryToSplitAndRedo",value:function(e,t,n,r){if(t.canSplit())return this._splitFutureWorkspaceElement(t,n),this._notificationService.info(r),new ya(this.redo(e));var i,o=Object(Z.a)(t.strResources);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.removeElements(a)}}catch(s){o.e(s)}finally{o.f()}return this._notificationService.info(r),new ya}},{key:"_checkWorkspaceRedo",value:function(e,t,n,r){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,En.a({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(r&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,En.a({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()));var i,o=[],a=Object(Z.a)(n.editStacks);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.getClosestFutureElement()!==t&&o.push(s.resourceLabel)}}catch(h){a.e(h)}finally{a.f()}if(o.length>0)return this._tryToSplitAndRedo(e,t,null,En.a({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,o.join(", ")));var l,c=[],u=Object(Z.a)(n.editStacks);try{for(u.s();!(l=u.n()).done;){var d=l.value;d.locked&&c.push(d.resourceLabel)}}catch(h){u.e(h)}finally{u.f()}return c.length>0?this._tryToSplitAndRedo(e,t,null,En.a({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,c.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(e,t,null,En.a({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))}},{key:"_workspaceRedo",value:function(e,t){var n=this._getAffectedEditStacks(t),r=this._checkWorkspaceRedo(e,t,n,!1);return r?r.returnValue:this._executeWorkspaceRedo(e,t,n)}},{key:"_executeWorkspaceRedo",value:function(e,t,n){return la(this,void 0,void 0,J.a.mark((function r(){var i,o,a,s;return J.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this._invokeWorkspacePrepare(t);case 3:i=r.sent,r.next=9;break;case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",this._onError(r.t0,t));case 9:if(!(o=this._checkWorkspaceRedo(e,t,n,!0))){r.next=13;break}return i.dispose(),r.abrupt("return",o.returnValue);case 13:a=Object(Z.a)(n.editStacks);try{for(a.s();!(s=a.n()).done;)s.value.moveForward(t)}catch(l){a.e(l)}finally{a.f()}return r.abrupt("return",this._safeInvokeWithLocks(t,(function(){return t.actual.redo()}),n,i));case 16:case"end":return r.stop()}}),r,this,[[0,6]])})))}},{key:"_resourceRedo",value:function(e,t){var n=this;if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(function(r){return e.moveForward(t),n._safeInvokeWithLocks(t,(function(){return t.actual.redo()}),new va([e]),r)}));var r=En.a({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(r)}else e.flushAllElements()}},{key:"redo",value:function(e){var t="string"===typeof e?e:this.getUriComparisonKey(e);if(this._editStacks.has(t)){var n=this._editStacks.get(t),r=n.getClosestFutureElement();if(r)try{return 1===r.type?this._workspaceRedo(t,r):this._resourceRedo(n,r)}finally{ca}}}}]),e}();ba=aa([sa(0,wo.a),sa(1,Pn.a)],ba);var ya=function e(t){Object(j.a)(this,e),this.returnValue=t};Object(Jo.b)(oa.a,ba);n(478);var Sa=n(9),Ca=(n(241),n(155)),ka=n(168),Ea=new Oe.b((function(){var e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));function wa(e,t,n){var r=e.toLowerCase(),i=t.toLowerCase(),o=function(e,t,n){var r=e.toLowerCase(),i=t.toLowerCase(),o=r.startsWith(n),a=i.startsWith(n);if(o!==a)return o?-1:1;if(o&&a){if(r.lengthi.length)return 1}return 0}(e,t,n);if(o)return o;var a=r.endsWith(n);if(a!==i.endsWith(n))return a?-1:1;var s=function(e,t){var n=e||"",r=t||"",i=Ea.value.collator.compare(n,r);return Ea.value.collatorIsNumeric&&0===i&&n!==r?n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Pa=te.$,ja=function(){function e(t){Object(j.a)(this,e),this.hidden=!1,this._onChecked=new U.a,this.onChecked=this._onChecked.event,Object(_n.a)(this,t)}return Object(F.a)(e,[{key:"dispose",value:function(){this._onChecked.dispose()}},{key:"checked",get:function(){return!!this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}}]),e}(),Fa=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"renderTemplate",value:function(e){var t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=te.append(e,Pa(".quick-input-list-entry"));var n=te.append(t.entry,Pa("label.quick-input-list-label"));t.toDisposeTemplate.push(te.addStandardDisposableListener(n,te.EventType.CLICK,(function(e){t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=te.append(n,Pa("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(te.addStandardDisposableListener(t.checkbox,te.EventType.CHANGE,(function(e){t.element.checked=t.checkbox.checked})));var r=te.append(n,Pa(".quick-input-list-rows")),i=te.append(r,Pa(".quick-input-list-row")),o=te.append(r,Pa(".quick-input-list-row"));t.label=new Oa.a(i,{supportHighlights:!0,supportDescriptionHighlights:!0,supportCodicons:!0});var a=te.append(i,Pa(".quick-input-list-entry-keybinding"));t.keybinding=new Ra(a,Ne.a);var s=te.append(o,Pa(".quick-input-list-label-meta"));return t.detail=new Ta.a(s,!0),t.separator=te.append(t.entry,Pa(".quick-input-list-separator")),t.actionBar=new qi.a(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}},{key:"renderElement",value:function(e,t,n){n.toDisposeElement=Object(Te.f)(n.toDisposeElement),n.element=e,n.checkbox.checked=e.checked,n.toDisposeElement.push(e.onChecked((function(e){return n.checkbox.checked=e})));var r=e.labelHighlights,i=e.descriptionHighlights,o=e.detailHighlights,a=Object.create(null);a.matches=r||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=i||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,n.label.setLabel(e.saneLabel,e.saneDescription,a),n.keybinding.set(e.item.keybinding),n.detail.set(e.saneDetail,o),e.separator&&e.separator.label?(n.separator.textContent=e.separator.label,n.separator.style.display=""):n.separator.style.display="none",e.separator?te.addClass(n.entry,"quick-input-list-separator-border"):te.removeClass(n.entry,"quick-input-list-separator-border"),n.actionBar.clear();var s=e.item.buttons;s&&s.length?(n.actionBar.push(s.map((function(t,n){var r=t.iconClass||(t.iconPath?Aa(t.iconPath):void 0);t.alwaysVisible&&(r=r?"".concat(r," always-visible"):"always-visible");var i=new Wi.a("id-".concat(n),"",r,!0,(function(){return e.fireButtonTriggered({button:t,item:e.item}),Promise.resolve()}));return i.tooltip=t.tooltip||"",i})),{icon:!0,label:!1}),te.addClass(n.entry,"has-actions")):te.removeClass(n.entry,"has-actions")}},{key:"disposeElement",value:function(e,t,n){n.toDisposeElement=Object(Te.f)(n.toDisposeElement)}},{key:"disposeTemplate",value:function(e){e.toDisposeElement=Object(Te.f)(e.toDisposeElement),e.toDisposeTemplate=Object(Te.f)(e.toDisposeTemplate)}},{key:"templateId",get:function(){return e.ID}}]),e}();Fa.ID="listelement";var Ba,Ua=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"getHeight",value:function(e){return e.saneDetail?44:22}},{key:"getTemplateId",value:function(e){return Fa.ID}}]),e}();!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"}(Ba||(Ba={}));var Ha=function(){function e(t,n,r){var i=this;Object(j.a)(this,e),this.parent=t,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new U.a,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new U.a,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new U.a,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new U.a,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new U.a,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new U.a,this.onKeyDown=this._onKeyDown.event,this._onLeave=new U.a,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=n,this.container=te.append(this.parent,Pa(".quick-input-list"));var o=new Ua,a=new za;this.list=r.createList("QuickInput",this.container,o,[new Fa],{identityProvider:{getId:function(e){return e.saneLabel}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:a}),this.list.getHTMLElement().id=n,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((function(e){var t=new un.a(e);switch(t.keyCode){case 10:i.toggleCheckbox();break;case 31:(Ne.f?e.metaKey:e.ctrlKey)&&i.list.setFocus(Object(Ue.s)(i.list.length));break;case 16:var n=i.list.getFocus();1===n.length&&0===n[0]&&i._onLeave.fire();break;case 18:var r=i.list.getFocus();1===r.length&&r[0]===i.list.length-1&&i._onLeave.fire()}i._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((function(e){2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(te.addDisposableListener(this.container,te.EventType.CLICK,(function(e){(e.x||e.y)&&i._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((function(e){i._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((function(e){"number"===typeof e.index&&(e.browserEvent.preventDefault(),i.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}return Object(F.a)(e,[{key:"getAllVisibleChecked",value:function(){return this.allVisibleChecked(this.elements,!1)}},{key:"allVisibleChecked",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0,r=e.length;n0){var n=this.list.getFocus()[0];"number"===typeof n&&this.list.reveal(n)}}},{key:"getActiveDescendant",value:function(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}},{key:"setSelectedElements",value:function(e){var t=this;this.list.setSelection(e.filter((function(e){return t.elementsToIndexes.has(e)})).map((function(e){return t.elementsToIndexes.get(e)})))}},{key:"getCheckedElements",value:function(){return this.elements.filter((function(e){return e.checked})).map((function(e){return e.item}))}},{key:"setCheckedElements",value:function(e){try{this._fireCheckedEvents=!1;var t,n=new Set,r=Object(Z.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n.add(i)}}catch(l){r.e(l)}finally{r.f()}var o,a=Object(Z.a)(this.elements);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.checked=n.has(s.item)}}catch(l){a.e(l)}finally{a.f()}}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}},{key:"focus",value:function(e){if(this.list.length){switch(e===Ba.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Ba.First),e===Ba.Previous&&0===this.list.getFocus()[0]&&(e=Ba.Last),e===Ba.Second&&this.list.length<2&&(e=Ba.First),e){case Ba.First:this.list.focusFirst();break;case Ba.Second:this.list.focusNth(1);break;case Ba.Last:this.list.focusLast();break;case Ba.Next:this.list.focusNext();break;case Ba.Previous:this.list.focusPrevious();break;case Ba.NextPage:this.list.focusNextPage();break;case Ba.PreviousPage:this.list.focusPreviousPage()}var t=this.list.getFocus()[0];"number"===typeof t&&this.list.reveal(t)}}},{key:"clearFocus",value:function(){this.list.setFocus([])}},{key:"domFocus",value:function(){this.list.domFocus()}},{key:"layout",value:function(e){this.list.getHTMLElement().style.maxHeight=e?"calc(".concat(44*Math.floor(e/44),"px)"):"",this.list.layout()}},{key:"filter",value:function(e){var t=this;if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;(e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach((function(n){var r=t.matchOnLabel?Object(De.n)(Object(ka.b)(e,Object(ka.c)(n.saneLabel))):void 0,i=t.matchOnDescription?Object(De.n)(Object(ka.b)(e,Object(ka.c)(n.saneDescription||""))):void 0,o=t.matchOnDetail?Object(De.n)(Object(ka.b)(e,Object(ka.c)(n.saneDetail||""))):void 0;r||i||o?(n.labelHighlights=r,n.descriptionHighlights=i,n.detailHighlights=o,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0})):this.elements.forEach((function(e){e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;var n=e.index&&t.inputElements[e.index-1];e.separator=n&&"separator"===n.type?n:void 0}));var n=this.elements.filter((function(e){return!e.hidden}));if(this.sortByLabel&&e){var r=e.toLowerCase();n.sort((function(e,t){return function(e,t,n){var r=e.labelHighlights||[],i=t.labelHighlights||[];if(r.length&&!i.length)return-1;if(!r.length&&i.length)return 1;if(0===r.length&&0===i.length)return 0;return wa(e.saneLabel,t.saneLabel,n)}(e,t,r)}))}return this.elementsToIndexes=n.reduce((function(e,t,n){return e.set(t.item,n),e}),new Map),this.list.splice(0,this.list.length,n),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(n.length),!0}},{key:"toggleCheckbox",value:function(){try{this._fireCheckedEvents=!1;var e,t=this.list.getFocusedElements(),n=this.allVisibleChecked(t),r=Object(Z.a)(t);try{for(r.s();!(e=r.n()).done;){e.value.checked=!n}}catch(i){r.e(i)}finally{r.f()}}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}},{key:"display",value:function(e){this.container.style.display=e?"":"none"}},{key:"isDisplayed",value:function(){return"none"!==this.container.style.display}},{key:"dispose",value:function(){this.elementDisposables=Object(Te.f)(this.elementDisposables),this.disposables=Object(Te.f)(this.disposables)}},{key:"fireCheckedEvents",value:function(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}},{key:"fireButtonTriggered",value:function(e){this._onButtonTriggered.fire(e)}},{key:"style",value:function(e){this.list.style(e)}},{key:"onDidChangeFocus",get:function(){return U.b.map(this.list.onDidChangeFocus,(function(e){return e.elements.map((function(e){return e.item}))}))}},{key:"onDidChangeSelection",get:function(){return U.b.map(this.list.onDidChangeSelection,(function(e){return{items:e.elements.map((function(e){return e.item})),event:e.browserEvent}}))}},{key:"enabled",set:function(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}}]),e}();Ma([xa.a],Ha.prototype,"onDidChangeFocus",null),Ma([xa.a],Ha.prototype,"onDidChangeSelection",null);var za=function(){function e(){Object(j.a)(this,e)}return Object(F.a)(e,[{key:"getWidgetAriaLabel",value:function(){return Object(En.a)("quickInput","Quick Input")}},{key:"getAriaLabel",value:function(e){return e.saneAriaLabel}},{key:"getWidgetRole",value:function(){return"listbox"}},{key:"getRole",value:function(){return"option"}}]),e}(),Va=n(214),Wa=te.$,Ga=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this)).parent=e,r.onKeyDown=function(e){return te.addDisposableListener(r.inputBox.inputElement,te.EventType.KEY_DOWN,(function(t){e(new un.a(t))}))},r.onMouseDown=function(e){return te.addDisposableListener(r.inputBox.inputElement,te.EventType.MOUSE_DOWN,(function(t){e(new ro.a(t))}))},r.onDidChange=function(e){return r.inputBox.onDidChange(e)},r.container=te.append(r.parent,Wa(".quick-input-box")),r.inputBox=r._register(new Va.b(r.container,void 0)),r}return Object(F.a)(n,[{key:"select",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.inputBox.select(e)}},{key:"isSelectionAtEnd",value:function(){return this.inputBox.isSelectionAtEnd()}},{key:"setAttribute",value:function(e,t){this.inputBox.inputElement.setAttribute(e,t)}},{key:"removeAttribute",value:function(e){this.inputBox.inputElement.removeAttribute(e)}},{key:"showDecoration",value:function(e){e===dn.a.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===dn.a.Info?1:e===dn.a.Warning?2:3,content:""})}},{key:"stylesForType",value:function(e){return this.inputBox.stylesForType(e===dn.a.Info?1:e===dn.a.Warning?2:3)}},{key:"setFocus",value:function(){this.inputBox.focus()}},{key:"layout",value:function(){this.inputBox.layout()}},{key:"style",value:function(e){this.inputBox.style(e)}},{key:"value",get:function(){return this.inputBox.value},set:function(e){this.inputBox.value=e}},{key:"placeholder",get:function(){return this.inputBox.inputElement.getAttribute("placeholder")||""},set:function(e){this.inputBox.setPlaceHolder(e)}},{key:"ariaLabel",get:function(){return this.inputBox.getAriaLabel()},set:function(e){this.inputBox.setAriaLabel(e)}},{key:"password",get:function(){return"password"===this.inputBox.inputElement.type},set:function(e){this.inputBox.inputElement.type=e?"password":"text"}}]),n}(Te.a),qa=n(238),Ka=(n(483),"done"),Ya="active",$a="infinite",Qa="discrete",Za={progressBarBackground:ii.a.fromHex("#0E70C0")},Xa=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this)).options=r||Object.create(null),Object(_n.g)(i.options,Za,!1),i.workedVal=0,i.progressBarBackground=i.options.progressBarBackground,i._register(i.showDelayedScheduler=new Oe.d((function(){return Object(te.show)(i.element)}),0)),i.create(e),i}return Object(F.a)(n,[{key:"create",value:function(e){this.element=document.createElement("div"),Object(te.addClass)(this.element,"monaco-progress-container"),e.appendChild(this.element),this.bit=document.createElement("div"),Object(te.addClass)(this.bit,"progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}},{key:"off",value:function(){this.bit.style.width="inherit",this.bit.style.opacity="1",Object(te.removeClasses)(this.element,Ya,$a,Qa),this.workedVal=0,this.totalWork=void 0}},{key:"stop",value:function(){return this.doDone(!1)}},{key:"doDone",value:function(e){var t=this;return Object(te.addClass)(this.element,Ka),Object(te.hasClass)(this.element,$a)?(this.bit.style.opacity="0",e?setTimeout((function(){return t.off()}),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((function(){return t.off()}),200):this.off()),this}},{key:"infinite",value:function(){return this.bit.style.width="2%",this.bit.style.opacity="1",Object(te.removeClasses)(this.element,Qa,Ka),Object(te.addClasses)(this.element,Ya,$a),this}},{key:"getContainer",value:function(){return this.element}},{key:"style",value:function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}},{key:"applyStyles",value:function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}]),n}(Te.a),Ja=(n(484),n(70));var es={buttonBackground:ii.a.fromHex("#0E639C"),buttonHoverBackground:ii.a.fromHex("#006BB3"),buttonForeground:ii.a.white},ts=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this))._onDidClick=i._register(new U.a),i.options=r||Object.create(null),Object(_n.g)(i.options,es,!1),i.buttonForeground=i.options.buttonForeground,i.buttonBackground=i.options.buttonBackground,i.buttonHoverBackground=i.options.buttonHoverBackground,i.buttonSecondaryForeground=i.options.buttonSecondaryForeground,i.buttonSecondaryBackground=i.options.buttonSecondaryBackground,i.buttonSecondaryHoverBackground=i.options.buttonSecondaryHoverBackground,i.buttonBorder=i.options.buttonBorder,i._element=document.createElement("a"),te.addClass(i._element,"monaco-button"),i._element.tabIndex=0,i._element.setAttribute("role","button"),e.appendChild(i._element),i._register(Ja.b.addTarget(i._element)),[te.EventType.CLICK,Ja.a.Tap].forEach((function(e){i._register(te.addDisposableListener(i._element,e,(function(e){i.enabled?i._onDidClick.fire(e):te.EventHelper.stop(e)})))})),i._register(te.addDisposableListener(i._element,te.EventType.KEY_DOWN,(function(e){var t=new un.a(e),n=!1;i.enabled&&(t.equals(3)||t.equals(10))?(i._onDidClick.fire(e),n=!0):t.equals(9)&&(i._element.blur(),n=!0),n&&te.EventHelper.stop(t,!0)}))),i._register(te.addDisposableListener(i._element,te.EventType.MOUSE_OVER,(function(e){te.hasClass(i._element,"disabled")||i.setHoverBackground()}))),i._register(te.addDisposableListener(i._element,te.EventType.MOUSE_OUT,(function(e){i.applyStyles()}))),i.focusTracker=i._register(te.trackFocus(i._element)),i._register(i.focusTracker.onDidFocus((function(){return i.setHoverBackground()}))),i._register(i.focusTracker.onDidBlur((function(){return i.applyStyles()}))),i.applyStyles(),i}return Object(F.a)(n,[{key:"setHoverBackground",value:function(){var e;(e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null)&&(this._element.style.backgroundColor=e)}},{key:"style",value:function(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()}},{key:"applyStyles",value:function(){if(this._element){var 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():"");var n=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=n?"1px":"",this._element.style.borderStyle=n?"solid":"",this._element.style.borderColor=n}}},{key:"onDidClick",get:function(){return this._onDidClick.event}},{key:"element",get:function(){return this._element}},{key:"label",set:function(e){te.hasClass(this._element,"monaco-text-button")||te.addClass(this._element,"monaco-text-button"),this.options.supportCodicons?te.reset.apply(te,[this._element].concat(Object(ee.a)(function(e){for(var t,n=new Array,r=0,i=0;null!==(t=eo.g.exec(e));){i=t.index||0,n.push(e.substring(r,i)),r=(t.index||0)+t[0].length;var o=t,a=Object(He.a)(o,5),s=a[1],l=a[2],c=a[3],u=a[4];n.push(s?"$(".concat(l,")"):te.$("span.codicon.codicon-".concat(c).concat(u?".codicon-animation-".concat(u):"")))}return r0&&(this.ui.isScreenReaderOptimized()?t=!0:e=!0),te.toggleClass(this.ui.container,"hidden-input",e);var r={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(r),Object(Ee.a)(Object(we.a)(n.prototype),"update",this).call(this),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{var i=this.ariaLabel||this.placeholder||n.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==i&&(this.ui.inputBox.ariaLabel=i)}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 Ca.a.NONE:this._itemActivation=Ca.a.FIRST;break;case Ca.a.SECOND:this.ui.list.focus(Ba.Second),this._itemActivation=Ca.a.FIRST;break;case Ca.a.LAST:this.ui.list.focus(Ba.Last),this._itemActivation=Ca.a.FIRST;break;default:this.trySelectFirst()}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(dn.a.Error)):(this.ui.message.textContent=null,this.showMessageDecoration(dn.a.Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),r.inputBox||this.ui.list.domFocus()}}},{key:"quickNavigate",get:function(){return this._quickNavigate},set:function(e){this._quickNavigate=e,this.update()}},{key:"value",get:function(){return this._value},set:function(e){this._value=e||"",this.update()}},{key:"ariaLabel",set:function(e){this._ariaLabel=e,this.update()},get:function(){return this._ariaLabel}},{key:"placeholder",get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.update()}},{key:"items",get:function(){return this._items},set:function(e){this._items=e,this.itemsUpdated=!0,this.update()}},{key:"canSelectMany",get:function(){return this._canSelectMany},set:function(e){this._canSelectMany=e,this.update()}},{key:"canAcceptInBackground",get:function(){return this._canAcceptInBackground},set:function(e){this._canAcceptInBackground=e}},{key:"matchOnDescription",get:function(){return this._matchOnDescription},set:function(e){this._matchOnDescription=e,this.update()}},{key:"matchOnDetail",get:function(){return this._matchOnDetail},set:function(e){this._matchOnDetail=e,this.update()}},{key:"matchOnLabel",get:function(){return this._matchOnLabel},set:function(e){this._matchOnLabel=e,this.update()}},{key:"sortByLabel",get:function(){return this._sortByLabel},set:function(e){this._sortByLabel=e,this.update()}},{key:"autoFocusOnList",get:function(){return this._autoFocusOnList},set:function(e){this._autoFocusOnList=e,this.update()}},{key:"itemActivation",get:function(){return this._itemActivation},set:function(e){this._itemActivation=e}},{key:"activeItems",get:function(){return this._activeItems},set:function(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}},{key:"selectedItems",get:function(){return this._selectedItems},set:function(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}},{key:"keyMods",get:function(){return this._quickNavigate?Ca.b:this.ui.keyMods}},{key:"valueSelection",set:function(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}},{key:"validationMessage",get:function(){return this._validationMessage},set:function(e){this._validationMessage=e,this.update()}},{key:"customButton",get:function(){return this._customButton},set:function(e){this._customButton=e,this.update()}},{key:"customLabel",get:function(){return this._customButtonLabel},set:function(e){this._customButtonLabel=e,this.update()}},{key:"customHover",get:function(){return this._customButtonHover},set:function(e){this._customButtonHover=e,this.update()}},{key:"ok",get:function(){return this._ok},set:function(e){this._ok=e,this.update()}},{key:"hideInput",get:function(){return!!this._hideInput},set:function(e){this._hideInput=e,this.update()}}]),n}(function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this)).ui=e,r.visible=!1,r._enabled=!0,r._busy=!1,r._ignoreFocusOut=!1,r._buttons=[],r.buttonsUpdated=!1,r.onDidTriggerButtonEmitter=r._register(new U.a),r.onDidHideEmitter=r._register(new U.a),r.onDisposeEmitter=r._register(new U.a),r.visibleDisposables=r._register(new Te.b),r.onDidHide=r.onDidHideEmitter.event,r}return Object(F.a)(n,[{key:"show",value:function(){var e=this;this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((function(t){-1!==e.buttons.indexOf(t)&&e.onDidTriggerButtonEmitter.fire(t)}))),this.ui.show(this),this.visible=!0,this.update())}},{key:"hide",value:function(){this.visible&&this.ui.hide()}},{key:"didHide",value:function(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}},{key:"update",value:function(){var e=this;if(this.visible){var t=this.getTitle();t&&this.ui.title.textContent!==t?this.ui.title.textContent=t:t||" "===this.ui.title.innerHTML||(this.ui.title.innerText="\xa0;");var n=this.getDescription();if(this.ui.description.textContent!==n&&(this.ui.description.textContent=n),this.busy&&!this.busyDelay&&(this.busyDelay=new Oe.e,this.busyDelay.setIfNotSet((function(){e.visible&&e.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();var r=this.buttons.filter((function(e){return e===is}));this.ui.leftActionBar.push(r.map((function(t,n){var r=new Wi.a("id-".concat(n),"",t.iconClass||Aa(t.iconPath),!0,(function(){return ns(e,void 0,void 0,J.a.mark((function e(){return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.onDidTriggerButtonEmitter.fire(t);case 1:case"end":return e.stop()}}),e,this)})))}));return r.tooltip=t.tooltip||"",r})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();var i=this.buttons.filter((function(e){return e!==is}));this.ui.rightActionBar.push(i.map((function(t,n){var r=new Wi.a("id-".concat(n),"",t.iconClass||Aa(t.iconPath),!0,(function(){return ns(e,void 0,void 0,J.a.mark((function e(){return J.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.onDidTriggerButtonEmitter.fire(t);case 1:case"end":return e.stop()}}),e,this)})))}));return r.tooltip=t.tooltip||"",r})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}}},{key:"getTitle",value:function(){return this.title&&this.step?"".concat(this.title," (").concat(this.getSteps(),")"):this.title?this.title:this.step?this.getSteps():""}},{key:"getDescription",value:function(){return this.description||""}},{key:"getSteps",value:function(){return this.step&&this.totalSteps?Object(En.a)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}},{key:"showMessageDecoration",value:function(e){if(this.ui.inputBox.showDecoration(e),e===dn.a.Error){var t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?"".concat(t.foreground):"",this.ui.message.style.backgroundColor=t.background?"".concat(t.background):"",this.ui.message.style.border=t.border?"1px solid ".concat(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=""}},{key:"dispose",value:function(){this.hide(),this.onDisposeEmitter.fire(),Object(Ee.a)(Object(we.a)(n.prototype),"dispose",this).call(this)}},{key:"title",get:function(){return this._title},set:function(e){this._title=e,this.update()}},{key:"description",get:function(){return this._description},set:function(e){this._description=e,this.update()}},{key:"step",get:function(){return this._steps},set:function(e){this._steps=e,this.update()}},{key:"totalSteps",get:function(){return this._totalSteps},set:function(e){this._totalSteps=e,this.update()}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e,this.update()}},{key:"contextKey",get:function(){return this._contextKey},set:function(e){this._contextKey=e,this.update()}},{key:"busy",get:function(){return this._busy},set:function(e){this._busy=e,this.update()}},{key:"ignoreFocusOut",get:function(){return this._ignoreFocusOut},set:function(e){this._ignoreFocusOut=e,this.update()}},{key:"buttons",get:function(){return this._buttons},set:function(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}}]),n}(Te.a));os.DEFAULT_ARIA_LABEL=Object(En.a)("quickInputBox.ariaLabel","Type to narrow down results.");var as=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e){var r;return Object(j.a)(this,n),(r=t.call(this)).options=e,r.comboboxAccessibility=!1,r.enabled=!0,r.onDidAcceptEmitter=r._register(new U.a),r.onDidCustomEmitter=r._register(new U.a),r.onDidTriggerButtonEmitter=r._register(new U.a),r.keyMods={ctrlCmd:!1,alt:!1},r.controller=null,r.onShowEmitter=r._register(new U.a),r.onShow=r.onShowEmitter.event,r.onHideEmitter=r._register(new U.a),r.onHide=r.onHideEmitter.event,r.idPrefix=e.idPrefix,r.parentElement=e.container,r.styles=e.styles,r.registerKeyModsListeners(),r}return Object(F.a)(n,[{key:"registerKeyModsListeners",value:function(){var e=this,t=function(t){e.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,e.keyMods.alt=t.altKey};this._register(te.addDisposableListener(window,te.EventType.KEY_DOWN,t,!0)),this._register(te.addDisposableListener(window,te.EventType.KEY_UP,t,!0)),this._register(te.addDisposableListener(window,te.EventType.MOUSE_DOWN,t,!0))}},{key:"getUI",value:function(){var e=this;if(this.ui)return this.ui;var t=te.append(this.parentElement,rs(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";var n=te.createStyleSheet(t),r=te.append(t,rs(".quick-input-titlebar")),i=this._register(new qi.a(r));i.domNode.classList.add("quick-input-left-action-bar");var o=te.append(r,rs(".quick-input-title")),a=this._register(new qi.a(r));a.domNode.classList.add("quick-input-right-action-bar");var s=te.append(t,rs(".quick-input-description")),l=te.append(t,rs(".quick-input-header")),c=te.append(l,rs("input.quick-input-check-all"));c.type="checkbox",this._register(te.addStandardDisposableListener(c,te.EventType.CHANGE,(function(e){var t=c.checked;k.setAllVisibleChecked(t)}))),this._register(te.addDisposableListener(c,te.EventType.CLICK,(function(e){(e.x||e.y)&&h.setFocus()})));var u=te.append(l,rs(".quick-input-and-message")),d=te.append(u,rs(".quick-input-filter")),h=this._register(new Ga(d));h.setAttribute("aria-describedby","".concat(this.idPrefix,"message"));var f=te.append(d,rs(".quick-input-visible-count"));f.setAttribute("aria-live","polite"),f.setAttribute("aria-atomic","true");var p=new qa.a(f,{countFormat:Object(En.a)({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")}),g=te.append(d,rs(".quick-input-count"));g.setAttribute("aria-live","polite");var m=new qa.a(g,{countFormat:Object(En.a)({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")}),v=te.append(l,rs(".quick-input-action")),_=new ts(v);_.label=Object(En.a)("ok","OK"),this._register(_.onDidClick((function(t){e.onDidAcceptEmitter.fire()})));var b=te.append(l,rs(".quick-input-action")),y=new ts(b);y.label=Object(En.a)("custom","Custom"),this._register(y.onDidClick((function(t){e.onDidCustomEmitter.fire()})));var S=te.append(u,rs("#".concat(this.idPrefix,"message.quick-input-message"))),C=new Xa(t);te.addClass(C.getContainer(),"quick-input-progress");var k=this._register(new Ha(t,this.idPrefix+"list",this.options));this._register(k.onChangedAllVisibleChecked((function(e){c.checked=e}))),this._register(k.onChangedVisibleCount((function(e){p.setCount(e)}))),this._register(k.onChangedCheckedCount((function(e){m.setCount(e)}))),this._register(k.onLeave((function(){setTimeout((function(){h.setFocus(),e.controller instanceof os&&e.controller.canSelectMany&&k.clearFocus()}),0)}))),this._register(k.onDidChangeFocus((function(){e.comboboxAccessibility&&e.getUI().inputBox.setAttribute("aria-activedescendant",e.getUI().list.getActiveDescendant()||"")})));var E=te.trackFocus(t);return this._register(E),this._register(te.addDisposableListener(t,te.EventType.FOCUS,(function(t){e.previousFocusElement=t.relatedTarget instanceof HTMLElement?t.relatedTarget:void 0}),!0)),this._register(E.onDidBlur((function(){e.getUI().ignoreFocusOut||e.options.ignoreFocusOut()||e.hide(),e.previousFocusElement=void 0}))),this._register(te.addDisposableListener(t,te.EventType.FOCUS,(function(e){h.setFocus()}))),this._register(te.addDisposableListener(t,te.EventType.KEY_DOWN,(function(n){var r=new un.a(n);switch(r.keyCode){case 3:te.EventHelper.stop(n,!0),e.onDidAcceptEmitter.fire();break;case 9:te.EventHelper.stop(n,!0),e.hide();break;case 2:if(!r.altKey&&!r.ctrlKey&&!r.metaKey){var i=[".action-label.codicon"];t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),e.getUI().list.isDisplayed()&&i.push(".monaco-list");var o=t.querySelectorAll(i.join(", "));r.shiftKey&&r.target===o[0]?(te.EventHelper.stop(n,!0),o[o.length-1].focus()):r.shiftKey||r.target!==o[o.length-1]||(te.EventHelper.stop(n,!0),o[0].focus())}}}))),this.ui={container:t,styleSheet:n,leftActionBar:i,titleBar:r,title:o,description:s,rightActionBar:a,checkAll:c,filterContainer:d,inputBox:h,visibleCountContainer:f,visibleCount:p,countContainer:g,count:m,okContainer:v,ok:_,message:S,customButtonContainer:b,customButton:y,progressBar:C,list:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:function(){return e.options.isScreenReaderOptimized()},show:function(t){return e.show(t)},hide:function(){return e.hide()},setVisibilities:function(t){return e.setVisibilities(t)},setComboboxAccessibility:function(t){return e.setComboboxAccessibility(t)},setEnabled:function(t){return e.setEnabled(t)},setContextKey:function(t){return e.options.setContextKey(t)}},this.updateStyles(),this.ui}},{key:"pick",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B.a.None;return new Promise((function(i,o){var a=function(e){a=i,n.onKeyMods&&n.onKeyMods(l.keyMods),i(e)};if(r.isCancellationRequested)a(void 0);else{var s,l=t.createQuickPick(),c=[l,l.onDidAccept((function(){if(l.canSelectMany)a(l.selectedItems.slice()),l.hide();else{var e=l.activeItems[0];e&&(a(e),l.hide())}})),l.onDidChangeActive((function(e){var t=e[0];t&&n.onDidFocus&&n.onDidFocus(t)})),l.onDidChangeSelection((function(e){if(!l.canSelectMany){var t=e[0];t&&(a(t),l.hide())}})),l.onDidTriggerItemButton((function(e){return n.onDidTriggerItemButton&&n.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:function(){var t=l.items.indexOf(e.item);if(-1!==t){var n=l.items.slice();n.splice(t,1),l.items=n}}}))})),l.onDidChangeValue((function(e){!s||e||1===l.activeItems.length&&l.activeItems[0]===s||(l.activeItems=[s])})),r.onCancellationRequested((function(){l.hide()})),l.onDidHide((function(){Object(Te.f)(c),a(void 0)}))];l.canSelectMany=!!n.canPickMany,l.placeholder=n.placeHolder,l.ignoreFocusOut=!!n.ignoreFocusLost,l.matchOnDescription=!!n.matchOnDescription,l.matchOnDetail=!!n.matchOnDetail,l.matchOnLabel=void 0===n.matchOnLabel||n.matchOnLabel,l.autoFocusOnList=void 0===n.autoFocusOnList||n.autoFocusOnList,l.quickNavigate=n.quickNavigate,l.contextKey=n.contextKey,l.busy=!0,Promise.all([e,n.activeItem]).then((function(e){var t=Object(He.a)(e,2),n=t[0],r=t[1];s=r,l.busy=!1,l.items=n,l.canSelectMany&&(l.selectedItems=n.filter((function(e){return"separator"!==e.type&&e.picked}))),s&&(l.activeItems=[s])})),l.show(),Promise.resolve(e).then(void 0,(function(e){o(e),l.hide()}))}}))}},{key:"createQuickPick",value:function(){var e=this.getUI();return new os(e)}},{key:"show",value:function(e){var t=this.getUI();this.onShowEmitter.fire();var n=this.controller;this.controller=e,n&&n.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(dn.a.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="";var r=this.options.backKeybindingLabel();is.tooltip=r?Object(En.a)("quickInput.backWithKeybinding","Back ({0})",r):Object(En.a)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}},{key:"setVisibilities",value:function(e){var 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()}},{key:"setComboboxAccessibility",value:function(e){if(e!==this.comboboxAccessibility){var 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"))}}},{key:"setEnabled",value:function(e){if(e!==this.enabled){this.enabled=e;var t,n=Object(Z.a)(this.getUI().leftActionBar.viewItems);try{for(n.s();!(t=n.n()).done;){t.value.getAction().enabled=e}}catch(o){n.e(o)}finally{n.f()}var r,i=Object(Z.a)(this.getUI().rightActionBar.viewItems);try{for(i.s();!(r=i.n()).done;){r.value.getAction().enabled=e}}catch(o){i.e(o)}finally{i.f()}this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}},{key:"hide",value:function(){var e,t=this.controller;if(t){var n=!(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",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),t.didHide()}}},{key:"layout",value:function(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}},{key:"updateLayout",value:function(){if(this.ui){this.ui.container.style.top="".concat(this.titleBarOffset,"px");var e=this.ui.container.style,t=Math.min(.62*this.dimension.width,n.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)}}},{key:"applyStyles",value:function(e){this.styles=e,this.updateStyles()}},{key:"updateStyles",value:function(){if(this.ui){var e=this.styles.widget,t=e.quickInputTitleBackground,n=e.quickInputBackground,r=e.quickInputForeground,i=e.contrastBorder,o=e.widgetShadow;this.ui.titleBar.style.backgroundColor=t?t.toString():"",this.ui.container.style.backgroundColor=n?n.toString():"",this.ui.container.style.color=r?r.toString():"",this.ui.container.style.border=i?"1px solid ".concat(i):"",this.ui.container.style.boxShadow=o?"0 5px 8px ".concat(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);var a=[];this.styles.list.listInactiveFocusForeground&&(a.push(".monaco-list .monaco-list-row.focused { color: ".concat(this.styles.list.listInactiveFocusForeground,"; }")),a.push(".monaco-list .monaco-list-row.focused:hover { color: ".concat(this.styles.list.listInactiveFocusForeground,"; }"))),this.styles.list.pickerGroupBorder&&a.push(".quick-input-list .quick-input-list-entry { border-top-color: ".concat(this.styles.list.pickerGroupBorder,"; }")),this.styles.list.pickerGroupForeground&&a.push(".quick-input-list .quick-input-list-separator { color: ".concat(this.styles.list.pickerGroupForeground,"; }"));var s=a.join("\n");s!==this.ui.styleSheet.innerHTML&&(this.ui.styleSheet.innerHTML=s)}}}]),n}(Te.a);as.MAX_WIDTH=600;var ss=n(116),ls=n(146),cs=n(145),us=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ds=function(e,t){return function(n,r){t(n,r,e)}},hs=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;return Object(j.a)(this,n),(i=t.call(this)).quickInputService=e,i.instantiationService=r,i.registry=Ur.a.as(ls.b.Quickaccess),i.mapProviderToDescriptor=new Map,i.lastAcceptedPickerValues=new Map,i.visibleQuickAccess=void 0,i}return Object(F.a)(n,[{key:"show",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=this.getOrInstantiateProvider(t),i=Object(He.a)(r,2),o=i[0],a=i[1],s=this.visibleQuickAccess,l=null===s||void 0===s?void 0:s.descriptor;if(s&&a&&l===a)return t===a.prefix||(null===n||void 0===n?void 0:n.preserveValue)||(s.picker.value=t),void this.adjustValueSelection(s.picker,a,n);if(a&&!(null===n||void 0===n?void 0:n.preserveValue)){var c=void 0;if(s&&l&&l!==a){var u=s.value.substr(l.prefix.length);u&&(c="".concat(a.prefix).concat(u))}if(!c){var d=null===o||void 0===o?void 0:o.defaultFilterValue;d===ls.a.LAST?c=this.lastAcceptedPickerValues.get(a):"string"===typeof d&&(c="".concat(a.prefix).concat(d))}"string"===typeof c&&(t=c)}var h=new Te.b,f=h.add(this.quickInputService.createQuickPick());f.value=t,this.adjustValueSelection(f,a,n),f.placeholder=null===a||void 0===a?void 0:a.placeholder,f.quickNavigate=null===n||void 0===n?void 0:n.quickNavigateConfiguration,f.hideInput=!!f.quickNavigate&&!s,("number"===typeof(null===n||void 0===n?void 0:n.itemActivation)||(null===n||void 0===n?void 0:n.quickNavigateConfiguration))&&(f.itemActivation=null!==(e=null===n||void 0===n?void 0:n.itemActivation)&&void 0!==e?e:ss.b.SECOND),f.contextKey=null===a||void 0===a?void 0:a.contextKey,f.filterValue=function(e){return e.substring(a?a.prefix.length:0)},(null===a||void 0===a?void 0:a.placeholder)&&(f.ariaLabel=null===a||void 0===a?void 0:a.placeholder);var p=this.registerPickerListeners(f,o,a,t,h);o&&h.add(o.provide(f,p)),f.show()}},{key:"adjustValueSelection",value:function(e,t,n){var r,i;i=(null===n||void 0===n?void 0:n.preserveValue)?[e.value.length,e.value.length]:[null!==(r=null===t||void 0===t?void 0:t.prefix.length)&&void 0!==r?r:0,e.value.length],e.valueSelection=i}},{key:"registerPickerListeners",value:function(e,t,n,r,i){var o=this,a=this.visibleQuickAccess={picker:e,descriptor:n,value:r};i.add(Object(Te.h)((function(){a===o.visibleQuickAccess&&(o.visibleQuickAccess=void 0)}))),i.add(e.onDidChangeValue((function(e){var n=o.getOrInstantiateProvider(e);Object(He.a)(n,1)[0]!==t?o.show(e,{preserveValue:!0}):a.value=e}))),n&&i.add(e.onDidAccept((function(){o.lastAcceptedPickerValues.set(n,e.value)})));var s=i.add(new B.b);return Object(cs.a)(e.onDidHide)((function(){0===e.selectedItems.length&&s.cancel(),i.dispose()})),s.token}},{key:"getOrInstantiateProvider",value:function(e){var t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];var n=this.mapProviderToDescriptor.get(t);return n||(n=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,n)),[n,t]}}]),n}(Te.a);hs=us([ds(0,ss.a),ds(1,fr.a)],hs);var fs=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ps=function(e,t){return function(n,r){t(n,r,e)}},gs=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o,a){var s;return Object(j.a)(this,n),(s=t.call(this,i)).instantiationService=e,s.contextKeyService=r,s.accessibilityService=o,s.layoutService=a,s.contexts=new Map,s}return Object(F.a)(n,[{key:"createController",value:function(){var e,t,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.layoutService,i=arguments.length>1?arguments[1]:void 0,o={idPrefix:"quickInput_",container:r.container,ignoreFocusOut:function(){return!1},isScreenReaderOptimized:function(){return n.accessibilityService.isScreenReaderOptimized()},backKeybindingLabel:function(){},setContextKey:function(e){return n.setContextKey(e)},returnFocus:function(){return r.focus()},createList:function(e,t,r,i,o){return n.instantiationService.createInstance(Po.d,e,t,r,i,o)},styles:this.computeStyles()},a=this._register(new as(Object.assign(Object.assign({},o),i)));return a.layout(r.dimension,null!==(t=null===(e=r.offset)||void 0===e?void 0:e.top)&&void 0!==t?t:0),this._register(r.onLayout((function(e){var t,n;return a.layout(e,null!==(n=null===(t=r.offset)||void 0===t?void 0:t.top)&&void 0!==n?n:0)}))),this._register(a.onShow((function(){return n.resetContextKeys()}))),this._register(a.onHide((function(){return n.resetContextKeys()}))),a}},{key:"setContextKey",value:function(e){var t;e&&((t=this.contexts.get(e))||(t=new dr.c(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}},{key:"resetContextKeys",value:function(){this.contexts.forEach((function(e){e.get()&&e.reset()}))}},{key:"pick",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B.a.None;return this.controller.pick(e,t,n)}},{key:"createQuickPick",value:function(){return this.controller.createQuickPick()}},{key:"updateStyles",value:function(){this.controller.applyStyles(this.computeStyles())}},{key:"computeStyles",value:function(){return{widget:Object.assign({},Object(po.d)(this.theme,{quickInputBackground:mi.dc,quickInputForeground:mi.ec,quickInputTitleBackground:mi.fc,contrastBorder:mi.h,widgetShadow:mi.uc})),inputBox:Object(po.d)(this.theme,{inputForeground:mi.hb,inputBackground:mi.fb,inputBorder:mi.gb,inputValidationInfoBackground:mi.lb,inputValidationInfoForeground:mi.nb,inputValidationInfoBorder:mi.mb,inputValidationWarningBackground:mi.ob,inputValidationWarningForeground:mi.qb,inputValidationWarningBorder:mi.pb,inputValidationErrorBackground:mi.ib,inputValidationErrorForeground:mi.kb,inputValidationErrorBorder:mi.jb}),countBadge:Object(po.d)(this.theme,{badgeBackground:mi.c,badgeForeground:mi.d,badgeBorder:mi.h}),button:Object(po.d)(this.theme,{buttonForeground:mi.f,buttonBackground:mi.e,buttonHoverBackground:mi.g,buttonBorder:mi.h}),progressBar:Object(po.d)(this.theme,{progressBarBackground:mi.cc}),list:Object(po.d)(this.theme,{listBackground:mi.dc,listInactiveFocusForeground:mi.yb,listInactiveFocusBackground:mi.xb,listFocusOutline:mi.b,listInactiveFocusOutline:mi.b,pickerGroupBorder:mi.Xb,pickerGroupForeground:mi.Yb})}}},{key:"controller",get:function(){return this._controller||(this._controller=this._register(this.createController())),this._controller}},{key:"quickAccess",get:function(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(hs))),this._quickAccess}}]),n}(gr.d),ms=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},vs=function(e,t){return function(n,r){t(n,r,e)}},_s=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r,i,o,a,s){var l;Object(j.a)(this,n),(l=t.call(this,r,i,o,a,s)).host=void 0;var c=ys.get(e);return l.host={_serviceBrand:void 0,get container(){return c.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onLayout(){return e.onDidLayoutChange},focus:function(){return e.focus()}},l}return Object(F.a)(n,[{key:"createController",value:function(){return Object(Ee.a)(Object(we.a)(n.prototype),"createController",this).call(this,this.host)}}]),n}(gs=fs([ps(0,fr.a),ps(1,dr.b),ps(2,gr.c),ps(3,mr.b),ps(4,So)],gs));_s=ms([vs(1,fr.a),vs(2,dr.b),vs(3,gr.c),vs(4,mr.b),vs(5,So)],_s);var bs=function(){function e(t,n){Object(j.a)(this,e),this.instantiationService=t,this.codeEditorService=n,this.mapEditorToService=new Map}return Object(F.a)(e,[{key:"pick",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B.a.None;return this.activeService.pick(e,t,n)}},{key:"createQuickPick",value:function(){return this.activeService.createQuickPick()}},{key:"activeService",get:function(){var e=this,t=this.codeEditorService.getFocusedCodeEditor();if(!t)throw new Error("Quick input service needs a focused editor to work.");var n=this.mapEditorToService.get(t);if(!n){var r=n=this.instantiationService.createInstance(_s,t);this.mapEditorToService.set(t,n),Object(cs.a)(t.onDidDispose)((function(){r.dispose(),e.mapEditorToService.delete(t)}))}return n}},{key:"quickAccess",get:function(){return this.activeService.quickAccess}}]),e}();bs=ms([vs(0,fr.a),vs(1,Q.a)],bs);var ys=function(){function e(t){Object(j.a)(this,e),this.editor=t,this.widget=new Ss(this.editor)}return Object(F.a)(e,[{key:"dispose",value:function(){this.widget.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();ys.ID="editor.controller.quickInput";var Ss=function(){function e(t){Object(j.a)(this,e),this.codeEditor=t,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}return Object(F.a)(e,[{key:"getId",value:function(){return e.ID}},{key:"getDomNode",value:function(){return this.domNode}},{key:"getPosition",value:function(){return{preference:2}}},{key:"dispose",value:function(){this.codeEditor.removeOverlayWidget(this)}}]),e}();Ss.ID="editor.contrib.quickInputWidget",Object(Sa.m)(ys.ID,ys);var Cs,ks=n(196);!function(e){var t=new Lo.a,n=function(){function e(t,n){Object(j.a)(this,e),this._serviceId=t,this._factory=n,this._value=null}return Object(F.a)(e,[{key:"get",value:function(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}},{key:"id",get:function(){return this._serviceId}}]),e}();e.LazyStaticService=n;var r=[];function i(e,t){var i=new n(e,t);return r.push(i),i}e.init=function(e){var t,n=new Lo.a,i=Object(Z.a)(Object(Jo.a)());try{for(i.s();!(t=i.n()).done;){var o=Object(He.a)(t.value,2),a=o[0],s=o[1];n.set(a,s)}}catch(u){i.e(u)}finally{i.f()}for(var l in e)e.hasOwnProperty(l)&&n.set(Object(fr.c)(l),e[l]);r.forEach((function(t){return n.set(t.id,t.get(e))}));var c=new Io(n,!0);return n.set(fr.a,c),[n,c]},e.instantiationService=i(fr.a,(function(){return new Io(t,!0)}));var o=new Qn;e.configurationService=i(mn.a,(function(){return o})),e.resourceConfigurationService=i(kt.a,(function(){return new Zn(o)})),e.resourcePropertiesService=i(kt.b,(function(){return new Xn(o)})),e.contextService=i(jn.a,(function(){return new er})),e.labelService=i(Mo.a,(function(){return new rr})),e.telemetryService=i(vo.a,(function(){return new Jn})),e.dialogService=i(wo.a,(function(){return new Gn})),e.notificationService=i(Pn.a,(function(){return new qn})),e.markerService=i(jo.b,(function(){return new Ho})),e.modeService=i(Or.a,(function(e){return new Wr})),e.standaloneThemeService=i(cr.a,(function(){return new Di})),e.logService=i(Et.b,(function(){return new Et.a})),e.undoRedoService=i(oa.a,(function(t){return new ba(e.dialogService.get(t),e.notificationService.get(t))})),e.modelService=i(Ct.a,(function(t){return new Gr.a(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t))})),e.markerDecorationsService=i(Ko.a,(function(t){return new Xo(e.modelService.get(t),e.markerService.get(t))})),e.codeEditorService=i(Q.a,(function(t){return new ri(e.standaloneThemeService.get(t))})),e.editorProgressService=i(_r.a,(function(){return new Wn})),e.storageService=i(zo.a,(function(){return new zo.b})),e.storageSyncService=i(ks.a,(function(){return new ks.b})),e.editorWorkerService=i(ye.a,(function(t){return new Lt(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))}))}(Cs||(Cs={}));var Es=function(e){Object(Ce.a)(n,e);var t=Object(ke.a)(n);function n(e,r){var i;Object(j.a)(this,n),i=t.call(this);var o=Cs.init(r),a=Object(He.a)(o,2),s=a[0],l=a[1];i._serviceCollection=s,i._instantiationService=l;var c=i.get(mn.a),u=i.get(Pn.a),d=i.get(vo.a),h=i.get(gr.c),f=i.get(Et.b),p=function(e,t){var n=null;return r&&(n=r[e.toString()]),n||(n=t()),i._serviceCollection.set(e,n),n},g=p(dr.b,(function(){return i._register(new zi(c))}));p(mr.b,(function(){return new na(g,c)})),p(Po.a,(function(){return new Po.b(h)}));var m=p(ae.b,(function(){return new Kn(i._instantiationService)})),v=p(pr.a,(function(){return i._register(new Yn(g,m,d,u,f,e))})),_=p(So,(function(){return new ir(Cs.codeEditorService.get(Q.a),e)}));p(ss.a,(function(){return new bs(l,Cs.codeEditorService.get(Q.a))}));var b=p(hr.b,(function(){return i._register(new Eo(_))}));return p(vr.a,(function(){return new ia})),p(hr.a,(function(){var e=new yo(d,u,b,v,h);return e.configure({blockMouse:!1}),i._register(e)})),p(ur.a,(function(){return new Go(m)})),p(fn.a,(function(){return new nr(Cs.modelService.get(Ct.a))})),i}return Object(F.a)(n,[{key:"get",value:function(e){var t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}},{key:"set",value:function(e,t){this._serviceCollection.set(e,t)}},{key:"has",value:function(e){return this._serviceCollection.has(e)}}]),n}(Te.a),ws=n(92);function Os(e,t,n){var r=new Es(e,t),i=null;r.has(Se.a)||(i=new Vn(Cs.modelService.get()),r.set(Se.a,i)),r.has(se.a)||r.set(se.a,new fe(r.get(Q.a),r.get(ae.b)));var o=n(r);return i&&i.setEditor(o),o}function Ts(e,t,n){return Os(e,n||{},(function(n){return new Er(e,t,n,n.get(fr.a),n.get(Q.a),n.get(ae.b),n.get(dr.b),n.get(pr.a),n.get(hr.b),n.get(cr.a),n.get(Pn.a),n.get(mn.a),n.get(mr.b))}))}function xs(e){return Cs.codeEditorService.get().onCodeEditorAdd((function(t){e(t)}))}function Ns(e,t,n){return Os(e,n||{},(function(n){return new wr(e,t,n,n.get(fr.a),n.get(dr.b),n.get(pr.a),n.get(hr.b),n.get(ye.a),n.get(Q.a),n.get(cr.a),n.get(Pn.a),n.get(mn.a),n.get(hr.a),n.get(_r.a),n.get(vr.a))}))}function Ds(e,t){return new pe.a(e,t)}function Ls(e,t,n){return Cs.modelService.get().createModel(e,t,n)}function As(e,t,n){if(e=e||"",!t){var r=e.indexOf("\n"),i=e;return-1!==r&&(i=e.substring(0,r)),Ls(e,Cs.modeService.get().createByFilepathOrFirstLine(n||null,i),n)}return Ls(e,Cs.modeService.get().create(t),n)}function Is(e,t){Cs.modelService.get().setMode(e,Cs.modeService.get().create(t))}function Rs(e,t,n){e&&Cs.markerService.get().changeOne(t,e.uri,n)}function Ms(e){return Cs.markerService.get().read(e)}function Ps(e){return Cs.modelService.get().getModel(e)}function js(){return Cs.modelService.get().getModels()}function Fs(e){return Cs.modelService.get().onModelAdded(e)}function Bs(e){return Cs.modelService.get().onModelRemoved(e)}function Us(e){return Cs.modelService.get().onModelModeChanged((function(t){e({model:t.model,oldLanguage:t.oldModeId})}))}function Hs(e){return function(e,t){return new Ft(e,t)}(Cs.modelService.get(),e)}function zs(e,t){var n=Cs.standaloneThemeService.get();return n.registerEditorContainer(e),sn.colorizeElement(n,Cs.modeService.get(),e,t)}function Vs(e,t,n){return Cs.standaloneThemeService.get().registerEditorContainer(document.body),sn.colorize(Cs.modeService.get(),e,t,n)}function Ws(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=Cs.standaloneThemeService.get();return r.registerEditorContainer(document.body),sn.colorizeModelLine(e,t,n)}function Gs(e,t){Cs.modeService.get().triggerMode(t);for(var n,r=(n=t,_e.C.get(n)||{getInitialState:function(){return be.c},tokenize:function(e,t,r){return Object(be.d)(n,e,t,r)}}),i=e.split(/\r\n|\r|\n/),o=[],a=r.getInitialState(),s=0,l=i.length;s1&&void 0!==arguments[1]&&arguments[1];t&&(e=e.map((function(e){return e.toLowerCase()})));var n=Zs(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function Js(e,t){for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,(function(n,r){var i="";if("string"===typeof e[r])i=e[r];else{if(!(e[r]&&e[r]instanceof RegExp))throw void 0===e[r]?Yt(e,"language definition does not contain attribute '"+r+"', used at: "+t):Yt(e,"attribute reference '"+r+"' must be a string, used at: "+t);i=e[r].source}return Gt(i)?"":"(?:"+i+")"}));var r=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,r)}function el(e,t,n,r){var i=-1,o=n,a=n.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);a&&(a[3]&&(i=parseInt(a[3]),a[2]&&(i+=100)),o=a[4]);var s,l="~",c=o;if(o&&0!==o.length?/^\w*$/.test(c)?l="==":(a=o.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(l=a[1],c=a[2]):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){var u=e[c];if(!u)throw Yt(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;var n,r=Object(Z.a)(t);try{for(r.s();!(n=r.n()).done;)if(!e(n.value))return!1}catch(i){r.e(i)}finally{r.f()}return!0}((function(e){return"string"===typeof e}),u))throw Yt(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);var d=Xs(u,e.ignoreCase);s=function(e){return"@"===l?d(e):!d(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){var h=Js(e,"^"+c+"$");s=function(e){return"~"===l?h.test(e):!h.test(e)}}else s=function(t,n,r,i){return Js(e,"^"+$t(e,c,n,r,i)+"$").test(t)};else if(c.indexOf("$")<0){var f=qt(e,c);s=function(e){return"=="===l?e===f:e!==f}}else{var p=qt(e,c);s=function(t,n,r,i,o){var a=$t(e,p,n,r,i);return"=="===l?t===a:t!==a}}else{var g=Xs(c.split("|"),e.ignoreCase);s=function(e){return"~"===l?g(e):!g(e)}}return-1===i?{name:n,value:r,test:function(e,t,n,r){return s(e,e,t,n,r)}}:{name:n,value:r,test:function(e,t,n,r){var o=function(e,t,n,r){if(r<0)return e;if(r=100){r-=100;var i=n.split(".");if(i.unshift(n),r=0&&(r.tokenSubst=!0),"string"===typeof n.bracket)if("@open"===n.bracket)r.bracket=1;else{if("@close"!==n.bracket)throw Yt(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);r.bracket=-1}if(n.next){if("string"!==typeof n.next)throw Yt(e,"the next state must be a string value in rule: "+t);var i=n.next;if(!/^(@pop|@push|@popall)$/.test(i)&&("@"===i[0]&&(i=i.substr(1)),i.indexOf("$")<0&&!function(e,t){for(var n=t;n&&n.length>0;){if(e.stateNames[n])return!0;var r=n.lastIndexOf(".");n=r<0?null:n.substr(0,r)}return!1}(e,$t(e,i,"",[],""))))throw Yt(e,"the next state '"+n.next+"' is not defined in rule: "+t);r.next=i}return"number"===typeof n.goBack&&(r.goBack=n.goBack),"string"===typeof n.switchTo&&(r.switchTo=n.switchTo),"string"===typeof n.log&&(r.log=n.log),"string"===typeof n.nextEmbedded&&(r.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),r}if(Array.isArray(n)){for(var o=[],a=0,s=n.length;a0&&"^"===n[0],this.name=this.name+": "+n,this.regex=Js(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")}},{key:"setAction",value:function(e,t){this.action=tl(e,this.name,t)}}]),e}();function rl(e){Br.a.registerLanguage(e)}function il(){var e=[];return e=e.concat(Br.a.getLanguages())}function ol(e){var t=Cs.modeService.get().getLanguageIdentifier(e);return t?t.id:0}function al(e,t){var n=Cs.modeService.get().onDidCreateMode((function(r){r.getId()===e&&(n.dispose(),t())}));return n}function sl(e,t){var n=Cs.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set configuration for unknown language ".concat(e));return Fe.a.register(n,t)}var ll=function(){function e(t){Object(j.a)(this,e),this._actual=t}return Object(F.a)(e,[{key:"getInitialState",value:function(){return this._actual.getInitialState()}},{key:"tokenize",value:function(e,t,n){throw new Error("Not supported!")}},{key:"tokenize2",value:function(e,t){var n=this._actual.tokenizeEncoded(e,t);return new q.c(n.tokens,n.endState)}}]),e}(),cl=function(){function e(t,n,r){Object(j.a)(this,e),this._standaloneThemeService=t,this._languageIdentifier=n,this._actual=r}return Object(F.a)(e,[{key:"getInitialState",value:function(){return this._actual.getInitialState()}},{key:"_toClassicTokens",value:function(e,t,n){for(var r=[],i=0,o=0,a=e.length;o0&&i[o-1]===u)){var d=c.startIndex;0===s?d=0:d=1&&c.length<=3)if(d.setRegex(r,c[0]),c.length>=3)if("string"===typeof c[1])d.setAction(r,{token:c[1],next:c[2]});else{if("object"!==typeof c[1])throw Yt(n,"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);var h=c[1];h.next=c[2],d.setAction(r,h)}else d.setAction(r,c[1]);else{if(!c.regex)throw Yt(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);c.name&&"string"===typeof c.name&&(d.name=c.name),c.matchOnlyAtStart&&(d.matchOnlyAtLineStart=$s(c.matchOnlyAtLineStart,!1)),d.setRegex(r,c.regex),d.setAction(r,c.action)}o.push(d)}}}catch(f){l.e(f)}finally{l.f()}}if(r.languageId=e,r.ignoreCase=n.ignoreCase,r.unicode=n.unicode,r.noThrow=n.noThrow,r.usesEmbedded=n.usesEmbedded,r.stateNames=t.tokenizer,r.defaultToken=n.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw Yt(n,"a language definition must define the 'tokenizer' attribute as an object");for(var o in n.tokenizer=[],t.tokenizer)if(t.tokenizer.hasOwnProperty(o)){n.start||(n.start=o);var a=t.tokenizer[o];n.tokenizer[o]=new Array,i("tokenizer."+o,n.tokenizer[o],a)}if(n.usesEmbedded=r.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Yt(n,"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"}];var s,l=[],c=Object(Z.a)(t.brackets);try{for(c.s();!(s=c.n()).done;){var u=s.value;if(u&&Array.isArray(u)&&3===u.length&&(u={token:u[2],open:u[0],close:u[1]}),u.open===u.close)throw Yt(n,"open and close brackets in a 'brackets' attribute must be different: "+u.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof u.open||"string"!==typeof u.token||"string"!==typeof u.close)throw Yt(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array");l.push({token:u.token+n.tokenPostfix,open:qt(n,u.open),close:qt(n,u.close)})}}catch(d){c.e(d)}finally{c.f()}return n.brackets=l,n.noThrow=!0,n}(e,t),new on(n,r,i,o);var n,r,i,o};return ul(t)?_e.C.registerPromise(e,t.then((function(e){return n(e)}))):_e.C.register(e,n(t))}function fl(e,t){return _e.v.register(e,t)}function pl(e,t){return _e.w.register(e,t)}function gl(e,t){return _e.y.register(e,t)}function ml(e,t){return _e.p.register(e,{provideHover:function(e,n,r){var i=e.getWordAtPosition(n);return Promise.resolve(t.provideHover(e,n,r)).then((function(e){if(e)return!e.range&&i&&(e.range=new W.a(n.lineNumber,i.startColumn,n.lineNumber,i.endColumn)),e.range||(e.range=new W.a(n.lineNumber,n.column,n.lineNumber,n.column)),e}))}})}function vl(e,t){return _e.m.register(e,t)}function _l(e,t){return _e.i.register(e,t)}function bl(e,t){return _e.u.register(e,t)}function yl(e,t){return _e.f.register(e,t)}function Sl(e,t){return _e.q.register(e,t)}function Cl(e,t){return _e.D.register(e,t)}function kl(e,t){return _e.b.register(e,t)}function El(e,t){return _e.a.register(e,{provideCodeActions:function(e,n,r,i){var o=Cs.markerService.get().read({resource:e.uri}).filter((function(e){return W.a.areIntersectingOrTouching(e,n)}));return t.provideCodeActions(e,n,{markers:o,only:r.only},i)}})}function wl(e,t){return _e.g.register(e,t)}function Ol(e,t){return _e.j.register(e,t)}function Tl(e,t){return _e.t.register(e,t)}function xl(e,t){return _e.s.register(e,t)}function Nl(e,t){return _e.d.register(e,t)}function Dl(e,t){return _e.c.register(e,t)}function Ll(e,t){return _e.o.register(e,t)}function Al(e,t){return _e.e.register(e,t)}function Il(e,t){return _e.x.register(e,t)}function Rl(e,t){return _e.l.register(e,t)}function Ml(e,t){return _e.k.register(e,t)}var Pl=self;P.g.wrappingIndent.defaultValue=0,P.g.glyphMargin.defaultValue=!1,P.g.autoIndent.defaultValue=3,P.g.overviewRulerLanes.defaultValue=2;var jl=Y();jl.editor={create:Ts,onDidCreateEditor:xs,createDiffEditor:Ns,createDiffNavigator:Ds,createModel:As,setModelLanguage:Is,setModelMarkers:Rs,getModelMarkers:Ms,getModels:js,getModel:Ps,onDidCreateModel:Fs,onWillDisposeModel:Bs,onDidChangeModelLanguage:Us,createWebWorker:Hs,colorizeElement:zs,colorize:Vs,colorizeModelLine:Ws,tokenize:Gs,defineTheme:qs,setTheme:Ks,remeasureFonts:Ys,AccessibilitySupport:r,ContentWidgetPositionPreference:l,CursorChangeReason:c,DefaultEndOfLine:u,EditorAutoIndentStrategy:h,EditorOption:f,EndOfLinePreference:p,EndOfLineSequence:g,MinimapPosition:y,MouseTargetType:S,OverlayWidgetPositionPreference:C,OverviewRulerLane:k,RenderLineNumbersType:E,RenderMinimap:w,ScrollbarVisibility:T,ScrollType:O,TextEditorCursorBlinkingStyle:A,TextEditorCursorStyle:I,TrackedRangeStickiness:R,WrappingIndent:M,ConfigurationChangedEvent:P.b,BareFontInfo:ge.a,FontInfo:ge.b,TextModelResolvedOptions:ve.e,FindMatch:ve.b,EditorType:me.a,EditorOptions:P.g},jl.languages={register:rl,getLanguages:il,onLanguage:al,getEncodedLanguageId:ol,setLanguageConfiguration:sl,setTokensProvider:dl,setMonarchTokensProvider:hl,registerReferenceProvider:fl,registerRenameProvider:pl,registerCompletionItemProvider:Nl,registerSignatureHelpProvider:gl,registerHoverProvider:ml,registerDocumentSymbolProvider:vl,registerDocumentHighlightProvider:_l,registerOnTypeRenameProvider:bl,registerDefinitionProvider:yl,registerImplementationProvider:Sl,registerTypeDefinitionProvider:Cl,registerCodeLensProvider:kl,registerCodeActionProvider:El,registerDocumentFormattingEditProvider:wl,registerDocumentRangeFormattingEditProvider:Ol,registerOnTypeFormattingEditProvider:Tl,registerLinkProvider:xl,registerColorProvider:Dl,registerFoldingRangeProvider:Ll,registerDeclarationProvider:Al,registerSelectionRangeProvider:Il,registerDocumentSemanticTokensProvider:Rl,registerDocumentRangeSemanticTokensProvider:Ml,DocumentHighlightKind:d,CompletionItemKind:o,CompletionItemTag:a,CompletionItemInsertTextRule:i,SymbolKind:D,SymbolTag:L,IndentAction:m,CompletionTriggerKind:s,SignatureHelpTriggerKind:N,FoldingRangeKind:_e.n};jl.CancellationTokenSource;var Fl=jl.Emitter,Bl=(jl.KeyCode,jl.KeyMod,jl.Position,jl.Range),Ul=(jl.Selection,jl.SelectionDirection,jl.MarkerSeverity),Hl=jl.MarkerTag,zl=jl.Uri,Vl=(jl.Token,jl.editor),Wl=jl.languages;Pl.monaco=jl,"undefined"!==typeof Pl.require&&"function"===typeof Pl.require.config&&Pl.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"]})},function(e,t,n){"use strict";n.r(t),n.d(t,"Decoration",(function(){return Dt})),n.d(t,"DecorationSet",(function(){return Rt})),n.d(t,"EditorView",(function(){return Gt})),n.d(t,"__endComposition",(function(){return yt})),n.d(t,"__parseFromClipboard",(function(){return Ve})),n.d(t,"__serializeForClipboard",(function(){return ze}));var r=n(37),i=n(31),o=n(68),a={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var s=/Edge\/(\d+)/.exec(navigator.userAgent),l=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);a.mac=/Mac/.test(navigator.platform);var u=a.ie=!!(l||c||s);a.ie_version=l?document.documentMode||6:c?+c[1]:s?+s[1]:null,a.gecko=!u&&/gecko\/(\d+)/i.test(navigator.userAgent),a.gecko_version=a.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var d=!u&&/Chrome\/(\d+)/.exec(navigator.userAgent);a.chrome=!!d,a.chrome_version=d&&+d[1],a.ios=!u&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),a.android=/Android \d/.test(navigator.userAgent),a.webkit="webkitFontSmoothing"in document.documentElement.style,a.safari=/Apple Computer/.test(navigator.vendor),a.webkit_version=a.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var h=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},f=function(e){var t=e.parentNode;return t&&11==t.nodeType?t.host:t},p=null,g=function(e,t,n){var r=p||(p=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},m=function(e,t,n,r){return n&&(b(e,t,n,r,-1)||b(e,t,n,r,1))},v=/^(img|br|input|textarea|hr)$/i;function b(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:y(e))){var o=e.parentNode;if(1!=o.nodeType||S(e)||v.test(e.nodeName)||"false"==e.contentEditable)return!1;t=h(e)+(i<0?0:1),e=o}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function S(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var C=function(e){var t=e.isCollapsed;return t&&a.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function k(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function E(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function w(e,t){return"number"==typeof e?e:e[t]}function O(e){var t=e.getBoundingClientRect();return{left:t.left,right:t.left+e.clientWidth,top:t.top,bottom:t.top+e.clientHeight}}function T(e,t,n){for(var r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument,a=n||e.dom;a;a=f(a))if(1==a.nodeType){var s=a==o.body||1!=a.nodeType,l=s?E(o):O(a),c=0,u=0;if(t.topl.bottom-w(r,"bottom")&&(u=t.bottom-l.bottom+w(i,"bottom")),t.leftl.right-w(r,"right")&&(c=t.right-l.right+w(i,"right")),c||u)if(s)o.defaultView.scrollBy(c,u);else{var d=a.scrollLeft,h=a.scrollTop;u&&(a.scrollTop+=u),c&&(a.scrollLeft+=c);var p=a.scrollLeft-d,g=a.scrollTop-h;t={left:t.left-p,top:t.top-g,right:t.right-p,bottom:t.bottom-g}}if(s)break}}function x(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=f(e));return t}function N(e,t){for(var n=0;n=s){a=Math.max(h.bottom,a),s=Math.min(h.top,s);var f=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),i=0;i=(o.left+o.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:L(n,r)}function A(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function I(e,t,n){var r=e.childNodes.length;if(r&&n.topt.top&&o++}i==e.dom&&o==i.childNodes.length-1&&1==i.lastChild.nodeType&&t.top>i.lastChild.getBoundingClientRect().bottom?u=e.state.doc.content.size:0!=o&&1==i.nodeType&&"BR"==i.childNodes[o-1].nodeName||(u=function(e,t,n,r){for(var i=-1,o=t;o!=e.dom;){var a=e.docView.nearestDesc(o,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)i=a.posBefore;else{if(!(s.right-1?i:e.docView.posFromDOM(t,n)}(e,i,o,t))}null==u&&(u=function(e,t,n){var r=L(t,n),i=r.node,o=r.offset,a=-1;if(1==i.nodeType&&!i.firstChild){var s=i.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(i,o,a)}(e,d,t));var g=e.docView.nearestDesc(d,!0);return{pos:u,inside:g?g.posAtStart-g.border:-1}}function M(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var P=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function j(e,t,n){var r=e.docView.domFromPos(t),i=r.node,o=r.offset,s=e.state.doc.resolve(t),l=s.parent.inlineContent,c=a.webkit||a.gecko;if(3==i.nodeType&&c&&P.test(i.nodeValue)){var u=M(g(i,o,o),n);if(a.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o=0&&o==y(i)&&i!=p;)o=h(i)+1,i=i.parentNode}if(3==i.nodeType)return n<0?F(M(g(i,o-1,o),1),!1):F(M(g(i,o,o+1),-1),!0);if(!l){if(o&&(n<0||o==y(i))){var m=i.childNodes[o-1];if(1==m.nodeType)return B(m.getBoundingClientRect(),!1)}if(o=0)}if(o&&(n<0||o==y(i))){var _=i.childNodes[o-1],b=3==_.nodeType?g(_,y(_)-(c?0:1)):1==_.nodeType&&"BR"!=_.nodeName?_:null;if(b)return F(M(b,1),!1)}if(o=0)}function F(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function B(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function U(e,t,n){var r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}var H=/[\u0590-\u08ac]/;var z=null,V=null,W=!1;function G(e,t,n){return z==t&&V==n?W:(z=t,V=n,W="up"==n||"down"==n?function(e,t,n){var r=t.selection,i="up"==n?r.$anchor.min(r.$head):r.$anchor.max(r.$head);return U(e,t,(function(){for(var t=e.docView.domFromPos(i.pos).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var o=j(e,i.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=g(a,0,a.nodeValue.length).getClientRects()}for(var l=0;lc.top&&("up"==n?c.bottomo.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var i=r.parentOffset,o=!i,a=i==r.parent.content.size,s=getSelection();return H.test(r.parent.textContent)&&s.modify?U(e,t,(function(){var t=s.getRangeAt(0),i=s.focusNode,o=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||i==s.focusNode&&o==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?o:a}(e,t,n))}var q=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},K={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};q.prototype.matchesWidget=function(){return!1},q.prototype.matchesMark=function(){return!1},q.prototype.matchesNode=function(){return!1},q.prototype.matchesHack=function(){return!1},K.beforePosition.get=function(){return!1},q.prototype.parseRule=function(){return null},q.prototype.stopEvent=function(){return!1},K.size.get=function(){for(var e=0,t=0;t0:s)?this.posAtEnd:this.posAtStart},q.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var i=this.getDesc(r);if(i&&(!t||i.node)){if(!n||!i.nodeDOM||(1==i.nodeDOM.nodeType?i.nodeDOM.contains(1==e.nodeType?e:e.parentNode):i.nodeDOM==e))return i;n=!1}}},q.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},q.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1},q.prototype.descAt=function(e){for(var t=0,n=0;t=c&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=o;for(var u=a;u>0;u--){var d=this.children[u-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=h(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var f=a+1;fl&&ot){var _=d;d=h,h=_}var b=document.createRange();b.setEnd(h.node,h.offset),b.setStart(d.node,d.offset),f.removeAllRanges(),f.addRange(b)}}},q.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},K.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},q.prototype.markDirty=function(e,t){for(var n=0,r=0;r=n:en){var a=n+i.border,s=o-i.border;if(e>=a&&t<=s)return this.dirty=e==n||t==o?2:1,void(e!=a||t!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-a,t-a):i.dirty=3);i.dirty=3}n=o}this.dirty=2},q.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty0&&(o=pe(o,0,e,r));for(var s=0;so;)c.push(i[l++]);var _=o+g.nodeSize;if(g.isText){var b=_;l=0&&!s&&l.syncToMarks(a==n.node.childCount?i.Mark.none:n.node.child(a).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,i,a){l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,i,a)||l.updateNextNode(t,n,i,e,a)||l.addNode(t,n,i,e,o),o+=t.nodeSize})),l.syncToMarks(Y,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),re(this.contentDOM,this.children,e),a.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionNode=function(e,t){var n=e.state.selection,i=n.from,o=n.to;if(!(!(e.state.selection instanceof r.TextSelection)||it+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=y(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t=n){var u=l.lastIndexOf(t,r-s);if(u>=0&&u+t.length+s>=n)return s+u}}}return-1}(this.node.content,l,i-t,o-t);return c<0?null:{node:s,pos:c,text:l}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,i=t.text;if(!this.getDesc(n)){for(var o=n;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=null)}var a=new Q(this,o,n,i);e.compositionNodes.push(a),this.children=pe(this.children,r,r+i.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!ue(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=se(this.dom,this.nodeDOM,ae(this.outerDeco,this.node,t),ae(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},Object.defineProperties(t.prototype,n),t}(q);function J(e,t,n,r,i){return ce(r,t,e),new X(null,e,t,n,r,r,r,i,0)}var ee=function(e){function t(t,n,r,i,o,a,s){e.call(this,t,n,r,i,o,null,a,s)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var i=this.node.cut(e,n),o=document.createTextNode(i.text);return new t(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)},t}(X),te=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(q),ne=function(e){function t(t,n,r,i,o,a,s,l,c,u){e.call(this,t,n,r,i,o,a,s,c,u),this.spec=l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,i){if(3==this.dirty)return!1;if(this.spec.update){var o=this.spec.update(t,n);return o&&this.updateInner(t,n,r,i),o}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,i)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,i)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(X);function re(e,t,n){for(var r=e.firstChild,i=!1,o=0;o0&&i>=0;i--){var o=t[i],a=o.node;if(a){if(a!=e.child(r-1))break;n.push(o),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function fe(e,t){return e.type.side-t.type.side}function pe(e,t,n,r,i){for(var o=[],a=0,s=0;a=n||u<=t?o.push(l):(cn&&o.push(l.slice(n-c,l.size,r)))}return o}function ge(e,t){var n=e.root.getSelection(),i=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(s<0)return null;var l,c,u=i.resolve(s);if(C(n)){for(l=u;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&r.NodeSelection.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(e,t,n){for(var r=0==t,i=t==y(e);r||i;){if(e==n)return!0;var o=h(e);if(!(e=e.parentNode))return!1;r=r&&0==o,i=i&&o==y(e)}}(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;c=new r.NodeSelection(s==d?u:i.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(f<0)return null;l=i.resolve(f)}c||(c=ke(e,l,u,"pointer"==t||e.state.selection.head=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},he.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n>1,o=Math.min(i,e.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=Z.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}},he.prototype.findNodeMatch=function(e,t,n,r){var i=-1,o=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(o&&o.matchesNode(e,t,n))i=a.indexOf(o);else for(var s=this.index,l=Math.min(a.length,s+5);s-1&&s+this.preMatchOffset!=i)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&ue(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,o),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1},he.prototype.addNode=function(e,t,n,r,i){this.top.children.splice(this.index++,0,X.create(this.top,e,t,n,r,i)),this.changed=!0},he.prototype.placeWidget=function(e,t,n){var r=this.index0?i.max(o):i.min(o),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function Oe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Te(e,t,n){var i=e.state.selection;if(!(i instanceof r.TextSelection)){if(i instanceof r.NodeSelection&&i.node.isInline)return Oe(e,new r.TextSelection(t>0?i.$to:i.$from));var o=we(e.state,t);return!!o&&Oe(e,o)}if(!i.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var s=we(e.state,t);return!!(s&&s instanceof r.NodeSelection)&&Oe(e,s)}if(!(a.mac&&n.indexOf("m")>-1)){var l,c=i.$head,u=c.textOffset?null:t<0?c.nodeBefore:c.nodeAfter;if(!u||u.isText)return!1;var d=t<0?c.pos-u.nodeSize:c.pos;return!!(u.isAtom||(l=e.docView.descAt(d))&&!l.contentDOM)&&(r.NodeSelection.isSelectable(u)?Oe(e,new r.NodeSelection(t<0?e.state.doc.resolve(c.pos-u.nodeSize):c)):!!a.webkit&&Oe(e,new r.TextSelection(e.state.doc.resolve(t<0?d:d+u.nodeSize))))}}function xe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ne(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function De(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var i,o,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var l=n.childNodes[r-1];if(Ne(l))i=n,o=--r;else{if(3!=l.nodeType)break;r=(n=l).nodeValue.length}}else{if(Ae(n))break;for(var c=n.previousSibling;c&&Ne(c);)i=n.parentNode,o=h(c),c=c.previousSibling;if(c)r=xe(n=c);else{if((n=n.parentNode)==e.dom)break;r=0}}s?Ie(e,t,n,r):i&&Ie(e,t,i,o)}}function Le(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var i,o,a=xe(n);;)if(r-1)return!1;if(a.mac&&n.indexOf("m")>-1)return!1;var o=i.$from,s=i.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var l=we(e.state,t);if(l&&l instanceof r.NodeSelection)return Oe(e,l)}if(!o.parent.inlineContent){var c=r.Selection.findFrom(t<0?o:s,t);return!c||Oe(e,c)}return!1}function Me(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,i=n.$head,o=n.$anchor,a=n.empty;if(!i.sameParent(o))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!i.textOffset&&(t<0?i.nodeBefore:i.nodeAfter);if(s&&!s.isText){var l=e.state.tr;return t<0?l.delete(i.pos-s.nodeSize,i.pos):l.delete(i.pos,i.pos+s.nodeSize),e.dispatch(l),!0}return!1}function Pe(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function je(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?Me(e,-1)||De(e):46==n||a.mac&&68==n&&"c"==r?Me(e,1)||Le(e):13==n||27==n||(37==n?Te(e,-1,r)||De(e):39==n?Te(e,1,r)||Le(e):38==n?Re(e,-1,r)||De(e):40==n?function(e){if(a.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var i=n.firstChild;Pe(e,i,!0),setTimeout((function(){return Pe(e,i,!1)}),20)}}}(e)||Re(e,1,r)||Le(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Fe(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(a.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||a.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function Be(e,t,n,o,s){if(t<0){var l=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,c=ge(e,l);if(c&&!e.state.selection.eq(c)){var u=e.state.tr.setSelection(c);"pointer"==l?u.setMeta("pointer",!0):"key"==l&&u.scrollIntoView(),e.dispatch(u)}}else{var d=e.state.doc.resolve(t),h=d.sharedDepth(n);t=d.before(h+1),n=e.state.doc.resolve(n).after(h+1);var f,p,g=e.state.selection,m=function(e,t,n){var r=e.docView.parseRange(t,n),o=r.node,s=r.fromOffset,l=r.toOffset,c=r.from,u=r.to,d=e.root.getSelection(),h=null,f=d.anchorNode;if(f&&e.dom.contains(1==f.nodeType?f:f.parentNode)&&(h=[{node:f,offset:d.anchorOffset}],C(d)||h.push({node:d.focusNode,offset:d.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var p=l;p>s;p--){var g=o.childNodes[p-1],m=g.pmViewDesc;if("BR"==g.nodeType&&!m){l=p;break}if(!m||m.size)break}var v=e.state.doc,_=e.someProp("domParser")||i.DOMParser.fromSchema(e.state.schema),b=v.resolve(c),y=null,S=_.parse(o,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:l,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:h,ruleFromNode:Fe,context:b});if(h&&null!=h[0].pos){var k=h[0].pos,E=h[1]&&h[1].pos;null==E&&(E=k),y={anchor:k+c,head:E+c}}return{doc:S,sel:y,from:c,to:u}}(e,t,n),v=e.state.doc,_=v.slice(m.from,m.to);8===e.lastKeyCode&&Date.now()-100=s?o-r:0)+(l-s),s=o}else if(l=l?o-r:0)+(s-l),l=o}return{start:o,endA:s,endB:l}}(_.content,m.doc.content,m.from,f,p);if(!b){if(!(o&&g instanceof r.TextSelection&&!g.empty&&g.$head.sameParent(g.$anchor))||e.composing||m.sel&&m.sel.anchor!=m.sel.head){if(m.sel){var y=Ue(e,e.state.doc,m.sel);y&&!y.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(y))}return}b={start:g.from,endA:g.to,endB:g.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>m.from&&" \xa0"==m.doc.textBetween(b.start-m.from-1,b.start-m.from+1)&&(b.start--,b.endA--,b.endB--);var S,E=m.doc.resolveNoCache(b.start-m.from),w=m.doc.resolveNoCache(b.endB-m.from),O=E.sameParent(w)&&E.parent.inlineContent;if((a.ios&&e.lastIOSEnter>Date.now()-225&&(!O||s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!O&&E.posb.start&&function(e,t,n,r,i){if(!r.parent.isTextblock||n-t<=i.pos-r.pos||He(r,!0,!1)n||He(a,!0,!1)t.content.size?null:ke(e,t.resolve(n.anchor),t.resolve(n.head))}function He(e,t,n){for(var r=e.depth,i=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n)for(var o=e.node(r).maybeChild(e.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function ze(e,t){for(var n=[],r=t.content,o=t.openStart,a=t.openEnd;o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,a--;var s=r.firstChild;n.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),r=s.content}var l=e.someProp("clipboardSerializer")||i.DOMSerializer.fromSchema(e.state.schema),c=Qe(),u=c.createElement("div");u.appendChild(l.serializeFragment(r,{document:c}));for(var d,h=u.firstChild;h&&1==h.nodeType&&(d=Ye[h.nodeName.toLowerCase()]);){for(var f=d.length-1;f>=0;f--){for(var p=c.createElement(d[f]);u.firstChild;)p.appendChild(u.firstChild);u.appendChild(p)}h=u.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",o+" "+a+" "+JSON.stringify(n)),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Ve(e,t,n,r,o){var a,s,l=o.parent.type.spec.code;if(!n&&!t)return null;var c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(function(e){t=e(t,l||r)})),l)return new i.Slice(i.Fragment.from(e.state.schema.text(t)),0,0);var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));u?s=u:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Qe().createElement("div"),i=/(?:]*>)*<([a-z][^>\s]+)/i.exec(e),o=0;(n=i&&Ye[i[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""})).reverse().join(""),o=n.length);r.innerHTML=e;for(var a=0;a=0;l-=2){var c=r.nodes[n[l]];if(!c||c.hasRequiredAttrs())break;o=i.Fragment.from(c.create(n[l+1],o)),a++,s++}return new i.Slice(o,a,s)}(function(e,t,n){t=0;r--){var o=n(r);if(o)return o.v}return e}(s.content,o),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}function We(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,i.Fragment.from(e));return e}function Ge(e,t,n,r,o){if(o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(i.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}var Ye={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},$e=null;function Qe(){return $e||($e=document.implementation.createHTMLDocument("title"))}var Ze={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Xe=a.ie&&a.ie_version<=11,Je=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Je.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Je.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var et=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Je,Xe&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};et.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},et.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},et.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ze),Xe&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},et.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ee(this.view)&&!this.ignoreSelectionChange(t),r=-1,i=-1,o=!1,s=[];if(this.view.editable)for(var l=0;l1){var u=s.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var d=u[0],h=u[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,i),function(e){if(tt)return;tt=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,i,o,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||me(this.view))}},et.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){var r=e.previousSibling,i=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var o=0;oo.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1)})))return{v:!0}},s=o.depth+1;s>0;s--){var l=a(s);if(l)return l.v}return!1}function ct(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ut(e,t,n,i,o){return lt(e,"handleClickOn",t,n,i)||e.someProp("handleClick",(function(n){return n(e,t,i)}))||(o?function(e,t){if(-1==t)return!1;var n,i,o=e.state.selection;o instanceof r.NodeSelection&&(n=o.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var l=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(l)){i=n&&o.$from.depth>0&&s>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(s);break}}return null!=i&&(ct(e,r.NodeSelection.create(e.state.doc,i),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),i=n.nodeAfter;return!!(i&&i.isAtom&&r.NodeSelection.isSelectable(i))&&(ct(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function dt(e,t,n,r){return lt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ht(e,t,n,i){return lt(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",(function(n){return n(e,t,i)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(ct(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var i=n.resolve(t),o=i.depth+1;o>0;o--){var a=o>i.depth?i.nodeAfter:i.node(o),s=i.before(o);if(a.inlineContent)ct(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;ct(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function ft(e){return yt(e)}rt.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!mt(e,t))if(e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||je(e,t)?t.preventDefault():it(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,k(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},rt.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},rt.keypress=function(e,t){if(!(mt(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection)||!n.$from.sameParent(n.$to)){var i=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,i)}))||e.dispatch(e.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}}};var pt=a.mac?"metaKey":"ctrlKey";nt.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ft(e),r=Date.now(),i="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[pt]&&("singleClick"==e.lastClick.type?i="doubleClick":"doubleClick"==e.lastClick.type&&(i="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:i};var o=e.posAtCoords(st(t));o&&("singleClick"==i?e.mouseDown=new gt(e,o,t,n):("doubleClick"==i?dt:ht)(e,o.pos,o.inside,t)?t.preventDefault():it(e,"pointer"))};var gt=function(e,t,n,i){var o,s,l=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=i,this.selectNode=n[pt],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{var c=e.state.doc.resolve(t.pos);o=c.parent,s=c.depth?c.before():0}this.mightDrag=null;var u=i?null:n.target,d=u?e.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null,(o.type.spec.draggable&&!1!==o.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(this.mightDrag={node:o,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return l.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),it(e,"pointer")};function mt(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}gt.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},gt.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(st(e))),this.allowDefault||!t?it(this.view,"pointer"):ut(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&(t.pos==this.view.state.selection.from||t.pos==this.view.state.selection.to)?(ct(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):it(this.view,"pointer")}},gt.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),it(this.view,"pointer")},nt.touchdown=function(e){ft(e),it(e,"pointer")},nt.contextmenu=function(e){return ft(e)};var vt=a.android?5e3:-1;function _t(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return yt(e)}),t))}function bt(e){for(e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function yt(e,t){if(e.domObserver.forceFlush(),bt(e),t||e.docView.dirty){var n=ge(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}rt.compositionstart=rt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),yt(e,!0),e.markCursor=null;else if(yt(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}i=s,o=-1}e.composing=!0}_t(e,vt)},rt.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,_t(e,20))};var St=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function Ct(e,t,n,r){var o=Ve(e,t,n,e.shiftKey,e.state.selection.$from);if(!e.someProp("handlePaste",(function(t){return t(e,r,o||i.Slice.empty)}))&&o){var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(o);e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}nt.copy=rt.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var i=St?null:t.clipboardData,o=ze(e,n.content()),a=o.dom,s=o.text;i?(t.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},rt.paste=function(e,t){var n=St?null:t.clipboardData,r=n&&n.getData("text/html"),i=n&&n.getData("text/plain");n&&(r||i||n.files.length)?(Ct(e,i,r,t),t.preventDefault()):function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ct(e,r.value,null,t):Ct(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var kt=function(e,t){this.slice=e,this.move=t},Et=a.mac?"altKey":"ctrlKey";for(var wt in nt.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var i=e.state.selection,o=i.empty?null:e.posAtCoords(st(t));if(o&&o.pos>=i.from&&o.pos<=(i instanceof r.NodeSelection?i.to-1:i.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=ze(e,s),c=l.dom,u=l.text;t.dataTransfer.clearData(),t.dataTransfer.setData(St?"Text":"text/html",c.innerHTML),St||t.dataTransfer.setData("text/plain",u),e.dragging=new kt(s,!t[Et])}},nt.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},rt.dragover=rt.dragenter=function(e,t){return t.preventDefault()},rt.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(st(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var l=n&&n.slice||Ve(e,t.dataTransfer.getData(St?"Text":"text/plain"),St?null:t.dataTransfer.getData("text/html"),!1,s),c=n&&!t[Et];if(e.someProp("handleDrop",(function(n){return n(e,t,l||i.Slice.empty,c)})))t.preventDefault();else if(l){t.preventDefault();var u=l?Object(o.g)(e.state.doc,s.pos,l):s.pos;null==u&&(u=s.pos);var d=e.state.tr;c&&d.deleteSelection();var h=d.mapping.map(u),f=0==l.openStart&&0==l.openEnd&&1==l.content.childCount,p=d.doc;if(f?d.replaceRangeWith(h,h,l.content.firstChild):d.replaceRange(h,h,l),!d.doc.eq(p)){var g=d.doc.resolve(h);if(f&&r.NodeSelection.isSelectable(l.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(l.content.firstChild))d.setSelection(new r.NodeSelection(g));else{var m=d.mapping.map(u);d.mapping.maps[d.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),d.setSelection(ke(e,g,d.doc.resolve(m)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))}}}}}},nt.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&me(e)}),20))},nt.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},nt.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,k(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},rt)nt[wt]=rt[wt];function Ot(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Tt=function(e,t){this.spec=t||It,this.side=this.spec.side||0,this.toDOM=e};Tt.prototype.map=function(e,t,n,r){var i=e.mapResult(t.from+r,this.side<0?-1:1),o=i.pos;return i.deleted?null:new Dt(o-n,o-n,this)},Tt.prototype.valid=function(){return!0},Tt.prototype.eq=function(e){return this==e||e instanceof Tt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ot(this.spec,e.spec))};var xt=function(e,t){this.spec=t||It,this.attrs=e};xt.prototype.map=function(e,t,n,r){var i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Dt(i,o,this)},xt.prototype.valid=function(e,t){return t.from=e&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;se){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,i)}},Rt.prototype.map=function(e,t,n){return this==Mt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||It)},Rt.prototype.mapInner=function(e,t,n,r,i){for(var o,a=0;al+o||(t>=s[a]+o?s[a+1]=-1:n>=i&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c))}},c=0;c=r.content.size){u=!0;continue}var p=n.map(e[d+1]+o,-1)-i,g=r.content.findIndex(f),m=g.index,v=g.offset,_=r.maybeChild(m);if(_&&v==f&&v+_.nodeSize==p){var b=s[d+2].mapInner(n,_,h+1,e[d]+o+1,a);b!=Mt?(s[d]=f,s[d+1]=p,s[d+2]=b):(s[d+1]=-2,u=!0)}else u=!0}if(u){var y=Ut(function(e,t,n,r,i,o,a){function s(e,t){for(var o=0;oa&&c.to=e){this.children[i]==e&&(n=this.children[i+2]);break}for(var o=e+1,a=o+t.content.size,s=0;so&&l.type instanceof xt){var c=Math.max(o,l.from)-o,u=Math.min(a,l.to)-o;cn&&a.to0;)t++;e.splice(t,0,n)}function Wt(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Mt&&t.push(r)})),e.cursorWrapper&&t.push(Rt.create(e.state.doc,[e.cursorWrapper.deco])),Pt.from(t)}Pt.prototype.forChild=function(e,t){if(t.isLeaf)return Rt.empty;for(var n=[],r=0;ri.scrollToSelection?"to selection":"preserve",h=o||!this.docView.matchesNode(e.doc,u,c);!h&&e.selection.eq(i.selection)||(s=!0);var f="preserve"==d&&s&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top),o=(r.left+r.right)/2,a=i+1;a=i-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:x(e.dom)}}(this);if(s){this.domObserver.stop();var p=h&&(a.ie||a.chrome)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(i.selection,e.selection);if(h){var g=a.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(e.doc,u,c,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=J(e.doc,u,c,this.dom,this)),g&&!this.trackWrites&&(p=!0)}p||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor),n=e.root.getSelection();return m(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?me(this,p):(Se(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(i),"reset"==d)this.dom.scrollTop=0;else if("to selection"==d){var v=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof r.NodeSelection?T(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),v):T(this,this.coordsAtPos(e.selection.head,1),v))}else f&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,i=t?t.getBoundingClientRect().top:0;N(r,0==i?0:i-n)}(f)},Gt.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Gt.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins)for(var t=0;t>>1,this._text=n}return Object(i.a)(e,[{key:"equals",value:function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)}},{key:"slicedEquals",value:function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var r=t<<1,i=r+(n<<1),o=r;o0?this._tokens[e-1<<1]:0}},{key:"getMetadata",value:function(e){return this._tokens[1+(e<<1)]}},{key:"getLanguageId",value:function(e){var t=this._tokens[1+(e<<1)];return o.B.getLanguageId(t)}},{key:"getStandardTokenType",value:function(e){var t=this._tokens[1+(e<<1)];return o.B.getTokenType(t)}},{key:"getForeground",value:function(e){var t=this._tokens[1+(e<<1)];return o.B.getForeground(t)}},{key:"getClassName",value:function(e){var t=this._tokens[1+(e<<1)];return o.B.getClassNameFromMetadata(t)}},{key:"getInlineStyle",value:function(e,t){var n=this._tokens[1+(e<<1)];return o.B.getInlineStyleFromMetadata(n,t)}},{key:"getEndOffset",value:function(e){return this._tokens[e<<1]}},{key:"findTokenIndexAtOffset",value:function(t){return e.findIndexInTokensArray(this._tokens,t)}},{key:"inflate",value:function(){return this}},{key:"sliceAndInflate",value:function(e,t,n){return new s(this,e,t,n)}}],[{key:"convertToEndOffset",value:function(e,t){for(var n=(e.length>>>1)-1,r=0;r>>1)-1;nt&&(r=i)}return n}}]),e}(),s=function(){function e(t,n,i,o){Object(r.a)(this,e),this._source=t,this._startOffset=n,this._endOffset=i,this._deltaOffset=o,this._firstTokenIndex=t.findTokenIndexAtOffset(n),this._tokensCount=0;for(var a=this._firstTokenIndex,s=t.getCount();a=i)break;this._tokensCount++}}return Object(i.a)(e,[{key:"equals",value:function(t){return t instanceof e&&(this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount))}},{key:"getCount",value:function(){return this._tokensCount}},{key:"getForeground",value:function(e){return this._source.getForeground(this._firstTokenIndex+e)}},{key:"getEndOffset",value:function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}},{key:"getClassName",value:function(e){return this._source.getClassName(this._firstTokenIndex+e)}},{key:"getInlineStyle",value:function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}},{key:"findTokenIndexAtOffset",value:function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(158);function i(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===r.a.ICodeEditor}function o(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===r.a.IDiffEditor}function a(e){return i(e)?e:o(e)?e.getModifiedEditor():null}},function(e,t,n){"use strict";n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return P})),n.d(t,"a",(function(){return B})),n.d(t,"h",(function(){return z})),n.d(t,"g",(function(){return V})),n.d(t,"d",(function(){return G})),n.d(t,"b",(function(){return q})),n.d(t,"c",(function(){return ee}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(27),l=n(6),c=n(0),u=n(1),d=(n(314),n(7)),h=n(33),f=n(24),p=n(104),g=n(3),m=n(21),v=n(70),_=n(75),b=n(12),y=n(52),S=n(164),C=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){return Object(c.a)(this,n),t.call(this,"ListError [".concat(e,"] ").concat(r))}return n}(Object(S.a)(Error)),k=n(190),E=n(23),w=n(54),O=function(){function e(t){Object(c.a)(this,e),this.spliceables=t}return Object(u.a)(e,[{key:"splice",value:function(e,t,n){this.spliceables.forEach((function(r){return r.splice(e,t,n)}))}}]),e}(),T=n(124),x=n(79),N=n(74),D=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},L=function(){function e(t){Object(c.a)(this,e),this.trait=t,this.renderedElements=[]}return Object(u.a)(e,[{key:"renderTemplate",value:function(e){return e}},{key:"renderElement",value:function(e,t,n){var r=Object(f.j)(this.renderedElements,(function(e){return e.templateData===n}));if(r>=0){var i=this.renderedElements[r];this.trait.unrender(n),i.index=t}else{var o={index:t,templateData:n};this.renderedElements.push(o)}this.trait.renderIndex(t,n)}},{key:"splice",value:function(e,t,n){var r,i=[],o=Object(l.a)(this.renderedElements);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.index=e+t&&i.push({index:a.index+n-t,templateData:a.templateData})}}catch(s){o.e(s)}finally{o.f()}this.renderedElements=i}},{key:"renderIndexes",value:function(e){var t,n=Object(l.a)(this.renderedElements);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.index,o=r.templateData;e.indexOf(i)>-1&&this.trait.renderIndex(i,o)}}catch(a){n.e(a)}finally{n.f()}}},{key:"disposeTemplate",value:function(e){var t=Object(f.j)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)}},{key:"templateId",get:function(){return"template:".concat(this.trait.trait)}}]),e}(),A=function(){function e(t){Object(c.a)(this,e),this._trait=t,this.indexes=[],this.sortedIndexes=[],this._onChange=new b.a,this.onChange=this._onChange.event}return Object(u.a)(e,[{key:"splice",value:function(e,t,n){var r=n.length-t,i=e+t,o=[].concat(Object(s.a)(this.sortedIndexes.filter((function(t){return t=i})).map((function(e){return e+r}))));this.renderer.splice(e,t,n.length),this._set(o,o)}},{key:"renderIndex",value:function(e,t){g.toggleClass(t,this._trait,this.contains(e))}},{key:"unrender",value:function(e){g.removeClass(e,this._trait)}},{key:"set",value:function(e,t){return this._set(e,Object(s.a)(e).sort(Q),t)}},{key:"_set",value:function(e,t,n){var r=this.indexes,i=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;var o=$(i,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:n}),r}},{key:"get",value:function(){return this.indexes}},{key:"contains",value:function(e){return Object(f.c)(this.sortedIndexes,e,Q)>=0}},{key:"dispose",value:function(){Object(d.f)(this._onChange)}},{key:"trait",get:function(){return this._trait}},{key:"renderer",get:function(){return new L(this)}}]),e}();D([p.a],A.prototype,"renderer",null);var I=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,"selected")).setAriaSelected=e,r}return Object(u.a)(n,[{key:"renderIndex",value:function(e,t){Object(r.a)(Object(i.a)(n.prototype),"renderIndex",this).call(this,e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}]),n}(A),R=function(){function e(t,n,r){Object(c.a)(this,e),this.trait=t,this.view=n,this.identityProvider=r}return Object(u.a)(e,[{key:"splice",value:function(e,t,n){var r=this;if(!this.identityProvider)return this.trait.splice(e,t,n.map((function(){return!1})));var i=this.trait.get().map((function(e){return r.identityProvider.getId(r.view.element(e)).toString()})),o=n.map((function(e){return i.indexOf(r.identityProvider.getId(e).toString())>-1}));this.trait.splice(e,t,o)}}]),e}();function M(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function P(e){return!!g.hasClass(e,"monaco-editor")||!g.hasClass(e,"monaco-list")&&(!!e.parentElement&&P(e.parentElement))}var j,F=function(){function e(t,n,r){Object(c.a)(this,e),this.list=t,this.view=n,this.disposables=new d.b;var i=!1!==r.multipleSelectionSupport,o=b.b.chain(Object(y.a)(n.domNode,"keydown")).filter((function(e){return!M(e.target)})).map((function(e){return new _.a(e)}));o.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),o.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),o.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),o.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),o.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),o.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),i&&o.filter((function(e){return(m.f?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return Object(u.a)(e,[{key:"onEnter",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}},{key:"onUpArrow",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}},{key:"onDownArrow",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}},{key:"onPageUpArrow",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}},{key:"onPageDownArrow",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}},{key:"onCtrlA",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(f.s)(this.list.length),e.browserEvent),this.view.domNode.focus()}},{key:"onEscape",value:function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus()}},{key:"dispose",value:function(){this.disposables.dispose()}}]),e}();!function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(j||(j={}));var B=new(function(){function e(){Object(c.a)(this,e)}return Object(u.a)(e,[{key:"mightProducePrintableCharacter",value:function(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)}}]),e}()),U=function(){function e(t,n,r,i){Object(c.a)(this,e),this.list=t,this.view=n,this.keyboardNavigationLabelProvider=r,this.delegate=i,this.enabled=!1,this.state=j.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new d.b,this.disposables=new d.b,this.updateOptions(t.options)}return Object(u.a)(e,[{key:"updateOptions",value:function(e){"undefined"===typeof e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}},{key:"enable",value:function(){var e=this;if(!this.enabled){var t=b.b.chain(Object(y.a)(this.view.domNode,"keydown")).filter((function(e){return!M(e.target)})).filter((function(){return e.automaticKeyboardNavigation||e.triggered})).map((function(e){return new _.a(e)})).filter((function(t){return e.delegate.mightProducePrintableCharacter(t)})).forEach((function(e){e.stopPropagation(),e.preventDefault()})).map((function(e){return e.browserEvent.key})).event,n=b.b.debounce(t,(function(){return null}),800);b.b.reduce(b.b.any(t,n),(function(e,t){return null===t?null:(e||"")+t}))(this.onInput,this,this.enabledDisposables),n(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}}},{key:"disable",value:function(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}},{key:"onClear",value:function(){var e,t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){var n=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));n&&Object(N.a)(n)}this.previouslyFocused=-1}},{key:"onInput",value:function(e){if(!e)return this.state=j.Idle,void(this.triggered=!1);var t=this.list.getFocus(),n=t.length>0?t[0]:0,r=this.state===j.Idle?1:0;this.state=j.Typing;for(var i=0;i=0&&e[i]===t-(n-i);)r.push(e[i--]);r.reverse(),i=n;for(;i=e.length)n.push(t[i++]);else if(i>=t.length)n.push(e[r++]);else{if(e[r]===t[i]){r++,i++;continue}e[r]=e.length)n.push(t[i++]);else if(i>=t.length)n.push(e[r++]);else{if(e[r]===t[i]){n.push(e[r]),r++,i++;continue}e[r]-1?t:[e]}},{key:"getDragURI",value:function(e){return this.dnd.getDragURI(e)}},{key:"getDragLabel",value:function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}},{key:"onDragStart",value:function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}},{key:"onDragOver",value:function(e,t,n,r){return this.dnd.onDragOver(e,t,n,r)}},{key:"onDragEnd",value:function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}},{key:"drop",value:function(e,t,n,r){this.dnd.drop(e,t,n,r)}}]),e}(),ee=function(){function e(t,n,r,i){var o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Y;Object(c.a)(this,e),this.user=t,this._options=a,this.eventBufferer=new b.c,this._ariaLabel="",this.disposables=new d.b,this.didJustPressContextMenuKey=!1,this._onDidDispose=new b.a,this.onDidDispose=this._onDidDispose.event;var s=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(o=this._options.accessibilityProvider)||void 0===o?void 0:o.getWidgetRole():"list";this.selection=new I("listbox"!==s),this.focus=new A("focused"),Object(w.g)(a,K,!1);var l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=a.accessibilityProvider,this.accessibilityProvider&&(l.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),i=i.map((function(e){return new Z(e.templateId,[].concat(l,[e]))}));var u=Object.assign(Object.assign({},a),{dnd:a.dnd&&new J(this,a.dnd)});if(this.view=new k.b(n,r,i,u),this.view.domNode.setAttribute("role",s),a.styleController)this.styleController=a.styleController(this.view.domId);else{var h=g.createStyleSheet(this.view.domNode);this.styleController=new q(h,this.view.domId)}if(this.spliceable=new O([new R(this.focus,this.view,a.identityProvider),new R(this.selection,this.view,a.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=b.b.map(Object(y.a)(this.view.domNode,"focus",!0),(function(){return null})),this.onDidBlur=b.b.map(Object(y.a)(this.view.domNode,"blur",!0),(function(){return null})),this.disposables.add(new H(this,this.view)),"boolean"!==typeof a.keyboardSupport||a.keyboardSupport){var f=new F(this,this.view,a);this.disposables.add(f)}if(a.keyboardNavigationLabelProvider){var p=a.keyboardNavigationDelegate||B;this.typeLabelController=new U(this,this.view,a.keyboardNavigationLabelProvider,p),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(a),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()),a.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}return Object(u.a)(e,[{key:"createMouseController",value:function(e){return new G(this)}},{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}},{key:"splice",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e<0||e>this.view.length)throw new C(this.user,"Invalid start index: ".concat(e));if(t<0)throw new C(this.user,"Invalid delete count: ".concat(t));0===t&&0===r.length||this.eventBufferer.bufferEvents((function(){return n.spliceable.splice(e,t,r)}))}},{key:"rerender",value:function(){this.view.rerender()}},{key:"element",value:function(e){return this.view.element(e)}},{key:"domFocus",value:function(){this.view.domNode.focus()}},{key:"layout",value:function(e,t){this.view.layout(e,t)}},{key:"setSelection",value:function(e,t){var n,r=Object(l.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i<0||i>=this.length)throw new C(this.user,"Invalid index ".concat(i))}}catch(o){r.e(o)}finally{r.f()}this.selection.set(e,t)}},{key:"getSelection",value:function(){return this.selection.get()}},{key:"getSelectedElements",value:function(){var e=this;return this.getSelection().map((function(t){return e.view.element(t)}))}},{key:"setFocus",value:function(e,t){var n,r=Object(l.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i<0||i>=this.length)throw new C(this.user,"Invalid index ".concat(i))}}catch(o){r.e(o)}finally{r.f()}this.focus.set(e,t)}},{key:"focusNext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(0!==this.length){var i=this.focus.get(),o=this.findNextIndex(i.length>0?i[0]+e:0,t,r);o>-1&&this.setFocus([o],n)}}},{key:"focusPrevious",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(0!==this.length){var i=this.focus.get(),o=this.findPreviousIndex(i.length>0?i[0]-e:0,t,r);o>-1&&this.setFocus([o],n)}}},{key:"focusNextPage",value:function(e,t){var n=this,r=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);r=0===r?0:r-1;var i=this.view.element(r),o=this.getFocusedElements()[0];if(o!==i){var a=this.findPreviousIndex(r,!1,t);a>-1&&o!==this.view.element(a)?this.setFocus([a],e):this.setFocus([r],e)}else{var s=this.view.getScrollTop();this.view.setScrollTop(s+this.view.renderHeight-this.view.elementHeight(r)),this.view.getScrollTop()!==s&&setTimeout((function(){return n.focusNextPage(e,t)}),0)}}},{key:"focusPreviousPage",value:function(e,t){var n,r=this,i=this.view.getScrollTop();n=0===i?this.view.indexAt(i):this.view.indexAfter(i-1);var o=this.view.element(n),a=this.getFocusedElements()[0];if(a!==o){var s=this.findNextIndex(n,!1,t);s>-1&&a!==this.view.element(s)?this.setFocus([s],e):this.setFocus([n],e)}else{var l=i;this.view.setScrollTop(i-this.view.renderHeight),this.view.getScrollTop()!==l&&setTimeout((function(){return r.focusPreviousPage(e,t)}),0)}}},{key:"focusLast",value:function(e,t){if(0!==this.length){var n=this.findPreviousIndex(this.length-1,!1,t);n>-1&&this.setFocus([n],e)}}},{key:"focusFirst",value:function(e,t){this.focusNth(0,e,t)}},{key:"focusNth",value:function(e,t,n){if(0!==this.length){var r=this.findNextIndex(e,!1,n);r>-1&&this.setFocus([r],t)}}},{key:"findNextIndex",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=0;r=this.length&&!t)return-1;if(e%=this.length,!n||n(this.element(e)))return e;e++}return-1}},{key:"findPreviousIndex",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=0;r=this.length)throw new C(this.user,"Invalid index ".concat(e));var n=this.view.getScrollTop(),r=this.view.elementTop(e),i=this.view.elementHeight(e);if(Object(h.h)(t)){var o=i-this.view.renderHeight;this.view.setScrollTop(o*Object(T.b)(t,0,1)+r)}else{var a=r+i,s=n+this.view.renderHeight;r=s||(r=s&&this.view.setScrollTop(a-this.view.renderHeight))}}},{key:"getRelativeTop",value:function(e){if(e<0||e>=this.length)throw new C(this.user,"Invalid index ".concat(e));var t=this.view.getScrollTop(),n=this.view.elementTop(e),r=this.view.elementHeight(e);if(nt+this.view.renderHeight)return null;var i=r-this.view.renderHeight;return Math.abs((t-n)/i)}},{key:"getHTMLElement",value:function(){return this.view.domNode}},{key:"style",value:function(e){this.styleController.style(e)}},{key:"toListEvent",value:function(e){var t=this,n=e.indexes,r=e.browserEvent;return{indexes:n,elements:n.map((function(e){return t.view.element(e)})),browserEvent:r}}},{key:"_onFocusChange",value:function(){var e=this.focus.get();g.toggleClass(this.view.domNode,"element-focused",e.length>0),this.onDidChangeActiveDescendant()}},{key:"onDidChangeActiveDescendant",value:function(){var e,t,n=this.focus.get();n.length>0?((null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(n[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(n[0]))):this.view.domNode.removeAttribute("aria-activedescendant")}},{key:"_onSelectionChange",value:function(){var e=this.selection.get();g.toggleClass(this.view.domNode,"selection-none",0===e.length),g.toggleClass(this.view.domNode,"selection-single",1===e.length),g.toggleClass(this.view.domNode,"selection-multiple",e.length>1)}},{key:"dispose",value:function(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}},{key:"onDidChangeFocus",get:function(){var e=this;return b.b.map(this.eventBufferer.wrapEvent(this.focus.onChange),(function(t){return e.toListEvent(t)}))}},{key:"onDidChangeSelection",get:function(){var e=this;return b.b.map(this.eventBufferer.wrapEvent(this.selection.onChange),(function(t){return e.toListEvent(t)}))}},{key:"domId",get:function(){return this.view.domId}},{key:"onMouseClick",get:function(){return this.view.onMouseClick}},{key:"onMouseDblClick",get:function(){return this.view.onMouseDblClick}},{key:"onMouseMiddleClick",get:function(){return this.view.onMouseMiddleClick}},{key:"onPointer",get:function(){return this.mouseController.onPointer}},{key:"onMouseDown",get:function(){return this.view.onMouseDown}},{key:"onTouchStart",get:function(){return this.view.onTouchStart}},{key:"onTap",get:function(){return this.view.onTap}},{key:"onContextMenu",get:function(){var e=this,t=b.b.chain(Object(y.a)(this.view.domNode,"keydown")).map((function(e){return new _.a(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,n=b.b.chain(Object(y.a)(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.getFocus().length>0&&!!e.view.domElement(e.getFocus()[0])})).map((function(t){var n=e.getFocus()[0];return{index:n,element:e.view.element(n),anchor:e.view.domElement(n),browserEvent:t}})).event,r=b.b.chain(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,n=e.index,r=e.browserEvent;return{element:t,index:n,anchor:{x:r.clientX+1,y:r.clientY},browserEvent:r}})).event;return b.b.any(t,n,r)}},{key:"onKeyDown",get:function(){return Object(y.a)(this.view.domNode,"keydown")}},{key:"options",get:function(){return this._options}},{key:"length",get:function(){return this.view.length}},{key:"contentHeight",get:function(){return this.view.contentHeight}},{key:"scrollTop",get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)}},{key:"ariaLabel",get:function(){return this._ariaLabel},set:function(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}}]),e}();D([p.a],ee.prototype,"onDidChangeFocus",null),D([p.a],ee.prototype,"onDidChangeSelection",null),D([p.a],ee.prototype,"onContextMenu",null)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(1);function o(e,t){for(var n=e.getCount(),r=e.findTokenIndexAtOffset(t),i=e.getLanguageId(r),o=r;o+10&&e.getLanguageId(s-1)===i;)s--;return new a(e,i,s,o+1,e.getStartOffset(s),e.getEndOffset(o))}var a=function(){function e(t,n,i,o,a,s){Object(r.a)(this,e),this._actual=t,this.languageId=n,this._firstTokenIndex=i,this._lastTokenIndex=o,this.firstCharOffset=a,this._lastCharOffset=s}return Object(i.a)(e,[{key:"getLineContent",value:function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}},{key:"getActualLineContentBefore",value:function(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}},{key:"getTokenCount",value:function(){return this._lastTokenIndex-this._firstTokenIndex}},{key:"findTokenIndexAtOffset",value:function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}},{key:"getStandardTokenType",value:function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}]),e}();function s(e){return 0!==(7&e)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(191),i=[];function o(e,t,n){i.push([e,new r.a(t,[],n)])}function a(){return i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(0),i=n(1),o=n(17),a=n(16),s=n(4),l=n(5),c=(n(313),n(7)),u=n(69),d=n(3),h=n(33),f=n(75),p=n(12),g=n(132),m=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var i,o,a,s,l,c,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(Object(r.a)(this,n),(i=t.call(this))._onDidBlur=i._register(new p.a),i.onDidBlur=i._onDidBlur.event,i._onDidCancel=i._register(new p.a),i.onDidCancel=i._onDidCancel.event,i._onDidRun=i._register(new p.a),i.onDidRun=i._onDidRun.event,i._onDidBeforeRun=i._register(new p.a),i.onDidBeforeRun=i._onDidBeforeRun.event,i.options=h,i._context=null!==(o=h.context)&&void 0!==o?o:null,i._orientation=null!==(a=i.options.orientation)&&void 0!==a?a:0,i._triggerKeys=null!==(s=i.options.triggerKeys)&&void 0!==s?s:{keys:[3,10],keyDown:!1},i.options.actionRunner?i._actionRunner=i.options.actionRunner:(i._actionRunner=new u.b,i._register(i._actionRunner)),i._register(i._actionRunner.onDidRun((function(e){return i._onDidRun.fire(e)}))),i._register(i._actionRunner.onDidBeforeRun((function(e){return i._onDidBeforeRun.fire(e)}))),i.viewItems=[],i.focusedItem=void 0,i.domNode=document.createElement("div"),i.domNode.className="monaco-action-bar",!1!==h.animated&&d.addClass(i.domNode,"animated"),i._orientation){case 0:l=15,c=17;break;case 1:l=17,c=15,i.domNode.className+=" reverse";break;case 2:l=16,c=18,i.domNode.className+=" vertical";break;case 3:l=18,c=16,i.domNode.className+=" vertical reverse"}return i._register(d.addDisposableListener(i.domNode,d.EventType.KEY_DOWN,(function(e){var t=new f.a(e),n=!0;t.equals(l)?n=i.focusPrevious():t.equals(c)?n=i.focusNext():t.equals(9)?i._onDidCancel.fire():i.isTriggerKeyEvent(t)?i._triggerKeys.keyDown&&i.doTrigger(t):n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),i._register(d.addDisposableListener(i.domNode,d.EventType.KEY_UP,(function(e){var t=new f.a(e);i.isTriggerKeyEvent(t)?(i._triggerKeys.keyDown||i.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&i.updateFocusedItem()}))),i.focusTracker=i._register(d.trackFocus(i.domNode)),i._register(i.focusTracker.onDidBlur((function(){d.getActiveElement()!==i.domNode&&d.isAncestor(d.getActiveElement(),i.domNode)||(i._onDidBlur.fire(),i.focusedItem=void 0)}))),i._register(i.focusTracker.onDidFocus((function(){return i.updateFocusedItem()}))),i.actionsList=document.createElement("ul"),i.actionsList.className="actions-container",i.actionsList.setAttribute("role","toolbar"),i.options.ariaLabel&&i.actionsList.setAttribute("aria-label",i.options.ariaLabel),i.domNode.appendChild(i.actionsList),e.appendChild(i.domNode),i}return Object(i.a)(n,[{key:"isTriggerKeyEvent",value:function(e){var t=!1;return this._triggerKeys.keys.forEach((function(n){t=t||e.equals(n)})),t}},{key:"updateFocusedItem",value:function(){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},r=Array.isArray(e)?e:[e],i=h.h(n.index)?n.index:null;r.forEach((function(e){var r,o=document.createElement("li");o.className="action-item",o.setAttribute("role","presentation"),t.options.allowContextMenu||t._register(d.addDisposableListener(o,d.EventType.CONTEXT_MENU,(function(e){d.EventHelper.stop(e,!0)}))),t.options.actionViewItemProvider&&(r=t.options.actionViewItemProvider(e)),r||(r=new g.a(t.context,e,n)),r.actionRunner=t._actionRunner,r.setActionContext(t.context),r.render(o),null===i||i<0||i>=t.actionsList.children.length?(t.actionsList.appendChild(o),t.viewItems.push(r)):(t.actionsList.insertBefore(o,t.actionsList.children[i]),t.viewItems.splice(i,0,r),i++)})),this.focusedItem&&this.focus(this.focusedItem)}},{key:"clear",value:function(){Object(c.f)(this.viewItems),this.viewItems=[],d.clearNode(this.actionsList)}},{key:"focus",value:function(e){var t=!1,n=void 0;void 0===e?t=!0:"number"===typeof e?n=e:"boolean"===typeof e&&(t=e),t&&"undefined"===typeof this.focusedItem?(this.focusedItem=-1,this.focusNext()):(void 0!==n&&(this.focusedItem=n),this.updateFocus())}},{key:"focusNext",value:function(){"undefined"===typeof this.focusedItem&&(this.focusedItem=this.viewItems.length-1);var e,t=this.focusedItem;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());return this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(),!0}},{key:"focusPrevious",value:function(){"undefined"===typeof this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}e=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());return this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0),!0}},{key:"updateFocus",value:function(e,t){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t});for(var n=0;n0&&u.push({open:h,close:f})}return u}(n);this.brackets=a.map((function(e,n){return new u(t,n,e.open,e.close,function(e,t,n,r){var i=[];i=(i=i.concat(e)).concat(t);for(var o=0,a=i.length;o=0&&r.push(u)}}catch(p){c.e(p)}finally{c.f()}var d,h=Object(i.a)(l.close);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.indexOf(e)>=0&&r.push(f)}}catch(p){h.e(p)}finally{h.f()}}}function f(e,t){return e.length-t.length}function p(e){if(e.length<=1)return e;var t,n=[],r=new Set,o=Object(i.a)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;r.has(a)||(n.push(a),r.add(a))}}catch(s){o.e(s)}finally{o.f()}return n}function g(e){var t=/^[\w ]+$/.test(e);return e=s.v(e),t?"\\b".concat(e,"\\b"):e}function m(e){var t="(".concat(e.map(g).join(")|("),")");return s.q(t,!0)}var v=function(){var e=null,t=null;return function(n){return e!==n&&(t=function(e){if(l.d){for(var t=new Uint16Array(e.length),n=0,r=e.length-1;r>=0;r--)t[n++]=e.charCodeAt(r);return l.c().decode(t)}for(var i=[],o=0,a=e.length-1;a>=0;a--)i[o++]=e.charAt(a);return i.join("")}(e=n)),t}}(),_=function(){function e(){Object(o.a)(this,e)}return Object(a.a)(e,null,[{key:"_findPrevBracketInText",value:function(e,t,n,r){var i=n.match(e);if(!i)return null;var o=n.length-(i.index||0),a=i[0].length,s=r+o;return new c.a(t,s-a+1,t,s+1)}},{key:"findPrevBracketInRange",value:function(e,t,n,r,i){var o=v(n).substring(n.length-i,n.length-r);return this._findPrevBracketInText(e,t,o,r)}},{key:"findNextBracketInText",value:function(e,t,n,r){var i=n.match(e);if(!i)return null;var o=i.index||0,a=i[0].length;if(0===a)return null;var s=r+o;return new c.a(t,s+1,t,s+1+a)}},{key:"findNextBracketInRange",value:function(e,t,n,r,i){var o=n.substring(r,i);return this.findNextBracketInText(e,t,o,r)}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"InputRule",(function(){return o})),n.d(t,"closeDoubleQuote",(function(){return h})),n.d(t,"closeSingleQuote",(function(){return p})),n.d(t,"ellipsis",(function(){return u})),n.d(t,"emDash",(function(){return c})),n.d(t,"inputRules",(function(){return a})),n.d(t,"openDoubleQuote",(function(){return d})),n.d(t,"openSingleQuote",(function(){return f})),n.d(t,"smartQuotes",(function(){return g})),n.d(t,"textblockTypeInputRule",(function(){return v})),n.d(t,"undoInputRule",(function(){return l})),n.d(t,"wrappingInputRule",(function(){return m}));var r=n(37),i=n(68),o=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,i){var o=n;if(t[1]){var a=t[0].lastIndexOf(t[1]);o+=t[0].slice(a+t[1].length);var s=(r+=a)-i;s>0&&(o=t[0].slice(a-s,a)+o,r=i)}return e.tr.insertText(o,r,i)}):t};function a(e){var t=e.rules,n=new r.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,i,o){return s(e,r,i,o,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&s(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function s(e,t,n,r,i,o){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,c=0;c=0;l--)a.step(s.steps[l].invert(s.docs[l]));if(o.text){var c=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,e.schema.text(o.text,c))}else a.delete(o.from,o.to);t(a)}return!0}}return!1}var c=new o(/--$/,"\u2014"),u=new o(/\.\.\.$/,"\u2026"),d=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),h=new o(/"$/,"\u201d"),f=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),p=new o(/'$/,"\u2019"),g=[d,h,f,p];function m(e,t,n,r){return new o(e,(function(e,o,a,s){var l=n instanceof Function?n(o):n,c=e.tr.delete(a,s),u=c.doc.resolve(a).blockRange(),d=u&&Object(i.h)(u,t,l);if(!d)return null;c.wrap(u,d);var h=c.doc.resolve(a-1).nodeBefore;return h&&h.type==t&&Object(i.e)(c.doc,a-1)&&(!r||r(o,h))&&c.join(a-1),c}))}function v(e,t,n){return new o(e,(function(e,r,i,o){var a=e.doc.resolve(i),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,s):null}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"autoJoin",(function(){return D})),n.d(t,"baseKeymap",(function(){return j})),n.d(t,"chainCommands",(function(){return L})),n.d(t,"createParagraphNear",(function(){return y})),n.d(t,"deleteSelection",(function(){return a})),n.d(t,"exitCode",(function(){return b})),n.d(t,"joinBackward",(function(){return s})),n.d(t,"joinDown",(function(){return g})),n.d(t,"joinForward",(function(){return d})),n.d(t,"joinUp",(function(){return p})),n.d(t,"lift",(function(){return m})),n.d(t,"liftEmptyBlock",(function(){return S})),n.d(t,"macBaseKeymap",(function(){return M})),n.d(t,"newlineInCode",(function(){return v})),n.d(t,"pcBaseKeymap",(function(){return R})),n.d(t,"selectAll",(function(){return w})),n.d(t,"selectNodeBackward",(function(){return c})),n.d(t,"selectNodeForward",(function(){return h})),n.d(t,"selectParentNode",(function(){return E})),n.d(t,"setBlockType",(function(){return x})),n.d(t,"splitBlock",(function(){return C})),n.d(t,"splitBlockKeepMarks",(function(){return k})),n.d(t,"toggleMark",(function(){return N})),n.d(t,"wrapIn",(function(){return T}));var r=n(68),i=n(31),o=n(37);function a(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function s(e,t,n){var i=e.selection.$cursor;if(!i||(n?!n.endOfTextblock("backward",e):i.parentOffset>0))return!1;var a=u(i);if(!a){var s=i.blockRange(),c=s&&Object(r.j)(s);return null!=c&&(t&&t(e.tr.lift(s,c).scrollIntoView()),!0)}var d=a.nodeBefore;if(!d.type.spec.isolating&&O(e,a,t))return!0;if(0==i.parent.content.size&&(l(d,"end")||o.NodeSelection.isSelectable(d))){if(t){var h=e.tr.deleteRange(i.before(),i.after());h.setSelection(l(d,"end")?o.Selection.findFrom(h.doc.resolve(h.mapping.map(a.pos,-1)),-1):o.NodeSelection.create(h.doc,a.pos-d.nodeSize)),t(h.scrollIntoView())}return!0}return!(!d.isAtom||a.depth!=i.depth-1)&&(t&&t(e.tr.delete(a.pos-d.nodeSize,a.pos).scrollIntoView()),!0)}function l(e,t){for(;e;e="start"==t?e.firstChild:e.lastChild)if(e.isTextblock)return!0;return!1}function c(e,t,n){var r=e.selection,i=r.$head,a=i;if(!r.empty)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;a=u(i)}var s=a&&a.nodeBefore;return!(!s||!o.NodeSelection.isSelectable(s))&&(t&&t(e.tr.setSelection(o.NodeSelection.create(e.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)}function u(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function d(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){var n=e.node(t);if(e.index(t)+11&&n.after()!=n.end(-1)){var i=n.before();if(Object(r.f)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}var o=n.blockRange(),a=o&&Object(r.j)(o);return null!=a&&(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}function C(e,t){var n=e.selection,a=n.$from,s=n.$to;if(e.selection instanceof o.NodeSelection&&e.selection.node.isBlock)return!(!a.parentOffset||!Object(r.f)(e.doc,a.pos))&&(t&&t(e.tr.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(t){var l=s.parentOffset==s.parent.content.size,c=e.tr;e.selection instanceof o.TextSelection&&c.deleteSelection();var u=0==a.depth?null:_(a.node(-1).contentMatchAt(a.indexAfter(-1))),d=l&&u?[{type:u}]:null,h=Object(r.f)(c.doc,c.mapping.map(a.pos),1,d);d||h||!Object(r.f)(c.doc,c.mapping.map(a.pos),1,u&&[{type:u}])||(d=[{type:u}],h=!0),h&&(c.split(c.mapping.map(a.pos),1,d),l||a.parentOffset||a.parent.type==u||!a.node(-1).canReplace(a.index(-1),a.indexAfter(-1),i.Fragment.from(u.create(),a.parent))||c.setNodeMarkup(c.mapping.map(a.before()),u)),t(c.scrollIntoView())}return!0}function k(e,t){return C(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function E(e,t){var n,r=e.selection,i=r.$from,a=r.to,s=i.sharedDepth(a);return 0!=s&&(n=i.before(s),t&&t(e.tr.setSelection(o.NodeSelection.create(e.doc,n))),!0)}function w(e,t){return t&&t(e.tr.setSelection(new o.AllSelection(e.doc))),!0}function O(e,t,n){var a,s,l=t.nodeBefore,c=t.nodeAfter;if(l.type.spec.isolating||c.type.spec.isolating)return!1;if(function(e,t,n){var i=t.nodeBefore,o=t.nodeAfter,a=t.index();return!!(i&&o&&i.type.compatibleContent(o.type))&&(!i.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(a,a+1)||!o.isTextblock&&!Object(r.e)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,i.type,i.contentMatchAt(i.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;if(t.parent.canReplace(t.index(),t.index()+1)&&(a=(s=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&s.matchType(a[0]||c.type).validEnd){if(n){for(var u=t.pos+c.nodeSize,d=i.Fragment.empty,h=a.length-1;h>=0;h--)d=i.Fragment.from(a[h].create(null,d));d=i.Fragment.from(l.copy(d));var f=e.tr.step(new r.b(t.pos-1,u,t.pos,u,new i.Slice(d,1,0),a.length,!0)),p=u+2*a.length;Object(r.e)(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}var g=o.Selection.findFrom(t,1),m=g&&g.$from.blockRange(g.$to),v=m&&Object(r.j)(m);return null!=v&&v>=t.depth&&(n&&n(e.tr.lift(m,v).scrollIntoView()),!0)}function T(e,t){return function(n,i){var o=n.selection,a=o.$from,s=o.$to,l=a.blockRange(s),c=l&&Object(r.h)(l,e,t);return!!c&&(i&&i(n.tr.wrap(l,c).scrollIntoView()),!0)}}function x(e,t){return function(n,r){var i=n.selection,o=i.from,a=i.to,s=!1;return n.doc.nodesBetween(o,a,(function(r,i){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var o=n.doc.resolve(i),a=o.index();s=o.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(o,a,e,t).scrollIntoView()),!0)}}function N(e,t){return function(n,r){var i=n.selection,o=i.empty,a=i.$cursor,s=i.ranges;if(o&&!a||!function(e,t,n){for(var r=function(r){var i=t[r],o=i.$from,a=i.$to,s=0==o.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(o.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},i=0;i-1}}return function(n,i){return e(n,i&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var i=[],o=0;o=0;b--)Object(r.e)(n.doc,l[b])&&n.join(l[b]);e(n)}}(i,t))}}function L(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var i=0;i=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}},{key:"get",value:function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}],[{key:"_createAsciiMap",value:function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t}}]),e}(),s=function(){function e(){Object(r.a)(this,e),this._actual=new a(0)}return Object(i.a)(e,[{key:"add",value:function(e){this._actual.set(e,1)}},{key:"has",value:function(e){return 1===this._actual.get(e)}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return y}));var r=n(0),i=n(1),o=n(36),a=n(17),s=n(16),l=n(4),c=n(5),u=(n(313),n(21)),d=n(2),h=n(7),f=n(69),p=n(3),g=n(33),m=n(70),v=n(135),_=n(46),b=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,i){var a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(r.a)(this,n),(a=t.call(this)).options=s,a._context=e||Object(o.a)(a),a._action=i,i instanceof f.a&&a._register(i.onDidChange((function(e){a.element&&a.handleActionChangeEvent(e)}))),a}return Object(i.a)(n,[{key:"handleActionChangeEvent",value:function(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()}},{key:"getAction",value:function(){return this._action}},{key:"isEnabled",value:function(){return this._action.enabled}},{key:"setActionContext",value:function(e){this._context=e}},{key:"render",value:function(e){var t=this,n=this.element=e;this._register(m.b.addTarget(e));var r=this.options&&this.options.draggable;r&&(e.draggable=!0,_.h&&this._register(p.addDisposableListener(e,p.EventType.DRAG_START,(function(e){var n;return null===(n=e.dataTransfer)||void 0===n?void 0:n.setData(v.a.TEXT,t._action.label)})))),this._register(p.addDisposableListener(n,m.a.Tap,(function(e){return t.onClick(e)}))),this._register(p.addDisposableListener(n,p.EventType.MOUSE_DOWN,(function(e){r||p.EventHelper.stop(e,!0),t._action.enabled&&0===e.button&&p.addClass(n,"active")}))),u.f&&this._register(p.addDisposableListener(n,p.EventType.CONTEXT_MENU,(function(e){0===e.button&&!0===e.ctrlKey&&t.onClick(e)}))),this._register(p.addDisposableListener(n,p.EventType.CLICK,(function(e){p.EventHelper.stop(e,!0),t.options&&t.options.isMenu||u.j((function(){return t.onClick(e)}))}))),this._register(p.addDisposableListener(n,p.EventType.DBLCLICK,(function(e){p.EventHelper.stop(e,!0)}))),[p.EventType.MOUSE_UP,p.EventType.MOUSE_OUT].forEach((function(e){t._register(p.addDisposableListener(n,e,(function(e){p.EventHelper.stop(e),p.removeClass(n,"active")})))}))}},{key:"onClick",value:function(e){var t;p.EventHelper.stop(e,!0);var n=g.l(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,n)}},{key:"focus",value:function(){this.element&&(this.element.focus(),p.addClass(this.element,"focused"))}},{key:"blur",value:function(){this.element&&(this.element.blur(),p.removeClass(this.element,"focused"))}},{key:"updateEnabled",value:function(){}},{key:"updateLabel",value:function(){}},{key:"updateTooltip",value:function(){}},{key:"updateClass",value:function(){}},{key:"updateChecked",value:function(){}},{key:"dispose",value:function(){this.element&&(p.removeNode(this.element),this.element=void 0),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"actionRunner",get:function(){return this._actionRunner||(this._actionRunner=this._register(new f.b)),this._actionRunner},set:function(e){this._actionRunner=e}}]),n}(h.a),y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,i){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(r.a)(this,n),(o=t.call(this,e,i,a)).options=a,o.options.icon=void 0!==a.icon&&a.icon,o.options.label=void 0===a.label||a.label,o.cssClass="",o}return Object(i.a)(n,[{key:"render",value:function(e){Object(a.a)(Object(s.a)(n.prototype),"render",this).call(this,e),this.element&&(this.label=p.append(this.element,p.$("a.action-label"))),this.label&&(this._action.id===f.c.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&&(p.append(this.element,p.$("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}},{key:"focus",value:function(){Object(a.a)(Object(s.a)(n.prototype),"focus",this).call(this),this.label&&this.label.focus()}},{key:"updateLabel",value:function(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}},{key:"updateTooltip",value:function(){var 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=d.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}},{key:"updateClass",value:function(){this.cssClass&&this.label&&p.removeClasses(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(p.addClass(this.label,"codicon"),this.cssClass&&p.addClasses(this.label,this.cssClass)),this.updateEnabled()):this.label&&p.removeClass(this.label,"codicon")}},{key:"updateEnabled",value:function(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),p.removeClass(this.label,"disabled"),this.label.tabIndex=0),this.element&&p.removeClass(this.element,"disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),p.addClass(this.label,"disabled"),p.removeTabIndexAndUpdateFocus(this.label)),this.element&&p.addClass(this.element,"disabled"))}},{key:"updateChecked",value:function(){this.label&&(this.getAction().checked?p.addClass(this.label,"checked"):p.removeClass(this.label,"checked"))}}]),n}(b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(0),i=n(1),o=function(){function e(t,n,i){Object(r.a)(this,e),this.offset=0|t,this.type=n,this.language=i}return Object(i.a)(e,[{key:"toString",value:function(){return"("+this.offset+", "+this.type+")"}}]),e}(),a=function e(t,n){Object(r.a)(this,e),this.tokens=t,this.endState=n},s=function e(t,n){Object(r.a)(this,e),this.tokens=t,this.endState=n}},function(e,t,n){"use strict";n.d(t,"f",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return _})),n.d(t,"e",(function(){return S})),n.d(t,"d",(function(){return C}));var r=n(6),i=n(22),o=n(0),a=n(1),s=n(24),l=n(117),c=n(19),u=n(8),d=n(20);function h(e){for(var t=0,n=0,r=0,i=0,o=0,a=e.length;o>>0}var p=new Uint32Array(0).buffer,g=function(){function e(){Object(o.a)(this,e),this.tokens=[]}return Object(a.a)(e,[{key:"add",value:function(e,t){if(this.tokens.length>0){var n=this.tokens[this.tokens.length-1];if(n.startLineNumber+n.tokens.length-1+1===e)return void n.tokens.push(t)}this.tokens.push(new b(e,[t]))}}]),e}(),m=function(){function e(t){Object(o.a)(this,e),this._tokens=t,this._tokenCount=t.length/4}return Object(a.a)(e,[{key:"toString",value:function(e){for(var t=[],n=0;ne)){for(var o=r;o>t&&this._getDeltaLine(o-1)===e;)o--;for(var a=r;ae||d===e&&f>=t)&&(dt||p===t&&m>=n){if(pi?p-=i-n:p=n;else if(h===t&&f===n){if(!(h===r&&p>i)){c=!0;continue}p-=i-n}else if(hi)){c=!0;continue}p=h===t?(f=n)+(p-i):(f=0)+(p-i)}else if(h>r){if(0===s&&!c){l=a;break}h-=s}else{if(!(h===r&&f>=i))throw new Error("Not possible!");e&&0===h&&(f+=e,p+=e),h-=s,f-=i-n,p-=i-n}var m=4*l;o[m]=h,o[m+1]=f,o[m+2]=p,o[m+3]=g,l++}}this._tokenCount=l}},{key:"acceptInsertText",value:function(e,t,n,r,i,o){for(var a=0===n&&1===r&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),s=this._tokens,l=this._tokenCount,c=0;c0?t.charCodeAt(0):0)}},{key:"acceptEdit",value:function(e,t,n,r,i){this._acceptDeleteRange(e),this._acceptInsertText(new c.a(e.startLineNumber,e.startColumn),t,n,r,i),this._updateEndLineNumber()}},{key:"_acceptDeleteRange",value:function(e){if(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn){var t=e.startLineNumber-this.startLineNumber,n=e.endLineNumber-this.startLineNumber;if(n<0){var r=n-t;this.startLineNumber-=r}else{var i=this.tokens.getMaxDeltaLine();if(!(t>=i+1)){if(t<0&&n>=i+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){var o=-t;this.startLineNumber-=o,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,n,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,n,e.endColumn-1)}}}}},{key:"_acceptInsertText",value:function(e,t,n,r,i){if(0!==t||0!==n){var o=e.lineNumber-this.startLineNumber;if(o<0)this.startLineNumber+=t;else o>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(o,e.column-1,t,n,r,i)}}}]),e}(),b=function e(t,n){Object(o.a)(this,e),this.startLineNumber=t,this.tokens=n};function y(e){return e instanceof Uint32Array?e:new Uint32Array(e)}var S=function(){function e(){Object(o.a)(this,e),this._pieces=[],this._isComplete=!1}return Object(a.a)(e,[{key:"flush",value:function(){this._pieces=[],this._isComplete=!1}},{key:"set",value:function(e,t){this._pieces=e||[],this._isComplete=t}},{key:"setPartial",value:function(e,t){var n=e;if(t.length>0){var r=t[0].getRange(),o=t[t.length-1].getRange();if(!r||!o)return e;n=e.plusRange(r).plusRange(o)}for(var a=null,l=0,c=this._pieces.length;ln.endLineNumber){a=a||{index:l};break}if(u.removeTokens(n),u.isEmpty())this._pieces.splice(l,1),l--,c--;else if(!(u.endLineNumbern.endLineNumber)a=a||{index:l};else{var d=u.split(n),h=Object(i.a)(d,2),f=h[0],p=h[1];f.isEmpty()?a=a||{index:l}:p.isEmpty()||(this._pieces.splice(l,1,f,p),l++,c++,a=a||{index:l})}}}return a=a||{index:this._pieces.length},t.length>0&&(this._pieces=s.a(this._pieces,a.index,t)),n}},{key:"isComplete",value:function(){return this._isComplete}},{key:"addSemanticTokens",value:function(t,n){var r=this._pieces;if(0===r.length)return n;var i=r[e._findFirstPieceWithLine(r,t)].getLineTokens(t);if(!i)return n;for(var o=n.getCount(),a=i.getCount(),s=0,c=[],u=0,d=0,h=function(e,t){e!==d&&(d=e,c[u++]=e,c[u++]=t)},f=0;f>>0,_=~v>>>0;st)){for(;i>n&&e[i-1].startLineNumber<=t&&t<=e[i-1].endLineNumber;)i--;return i}r=i-1}}return n}}]),e}(),C=function(){function e(){Object(o.a)(this,e),this._lineTokens=[],this._len=0}return Object(a.a)(e,[{key:"flush",value:function(){this._lineTokens=[],this._len=0}},{key:"getTokens",value:function(e,t,n){var r=null;if(t=this._len;)this._lineTokens[this._len]=null,this._len++}},{key:"_deleteLines",value:function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}},{key:"_insertLines",value:function(e,t){if(0!==t){for(var n=[],r=0;r=this._len))if(t.startLineNumber!==t.endLineNumber){this._lineTokens[n]=e._deleteEnding(this._lineTokens[n],t.startColumn-1);var r=t.endLineNumber-1,i=null;r=this._len||(0!==n?(this._lineTokens[i]=e._deleteEnding(this._lineTokens[i],t.column-1),this._lineTokens[i]=e._insert(this._lineTokens[i],t.column-1,r),this._insertLines(t.lineNumber,n)):this._lineTokens[i]=e._insert(this._lineTokens[i],t.column-1,r))}}}],[{key:"_massageTokens",value:function(e,t,n){var r=n?y(n):null;if(0===t){var i=!1;if(r&&r.length>1&&(i=d.B.getLanguageId(r[1])!==e),!i)return p}if(!r||0===r.length){var o=new Uint32Array(2);return o[0]=t,o[1]=f(e),o.buffer}return r[r.length-2]=t,0===r.byteOffset&&r.byteLength===r.buffer.byteLength?r.buffer:r}},{key:"_equals",value:function(e,t){if(!e||!t)return!e&&!t;var n=y(e),r=y(t);if(n.length!==r.length)return!1;for(var i=0,o=n.length;i>>1;if(0===t&&r[r.length-2]===n)return p;var o,a,s=l.a.findIndexInTokensArray(r,t),c=s>0?r[s-1<<1]:0;if(na&&(r[o++]=g,r[o++]=r[1+(f<<1)],a=g)}if(o===r.length)return e;var m=new Uint32Array(o);return m.set(r.subarray(0,o),0),m.buffer}},{key:"_append",value:function(e,t){if(t===p)return e;if(e===p)return t;if(null===e)return e;if(null===t)return null;var n=y(e),r=y(t),i=r.length>>>1,o=new Uint32Array(n.length+r.length);o.set(n,0);for(var a=n.length,s=n[n.length-2],l=0;l>>1,o=l.a.findIndexInTokensArray(r,t);o>0&&(r[o-1<<1]===t&&o--);for(var a=o;a1){var s;for(s=r-1;s>=1;s--){var l=n.getLineContent(s);if(d.J(l)>=0)break}if(s<1)return null;var c=n.getLineMaxColumn(s),u=y.a.getEnterAction(t.autoIndent,n,new p.a(s,c,s,c));u&&(o=u.indentation+u.appendText)}return i&&(i===b.a.Indent&&(o=e.shiftIndent(t,o)),i===b.a.Outdent&&(o=e.unshiftIndent(t,o)),o=t.normalizeIndentation(o)),o||null}},{key:"_replaceJumpToNextIndent",value:function(e,t,n,r){var i="",o=n.getStartPosition();if(e.insertSpaces)for(var a=v.a.visibleColumnFromColumn2(e,t,o),s=e.indentSize,l=s-a%s,c=0;c=4){var _=y.a.getIndentForEnter(t.autoIndent,n,i,{unshiftIndent:function(n){return e.unshiftIndent(t,n)},shiftIndent:function(n){return e.shiftIndent(t,n)},normalizeIndentation:function(e){return t.normalizeIndentation(e)}});if(_){var S=v.a.visibleColumnFromColumn2(t,n,i.getEndPosition()),C=i.endColumn,k="\n";m!==t.normalizeIndentation(_.beforeEnter)&&(k=t.normalizeIndentation(_.beforeEnter)+g.substring(m.length,i.startColumn-1)+"\n",i=new p.a(i.startLineNumber,1,i.endLineNumber,i.endColumn));var E=n.getLineContent(i.endLineNumber),w=d.w(E);if(i=w>=0?i.setEndPosition(i.endLineNumber,Math.max(i.endColumn,w+1)):i.setEndPosition(i.endLineNumber,n.getLineMaxColumn(i.endLineNumber)),r)return new h.e(i,k+t.normalizeIndentation(_.afterEnter),!0);var O=0;return C<=w+1&&(t.insertSpaces||(S=Math.ceil(S/t.indentSize)),O=Math.min(S+1-t.normalizeIndentation(_.afterEnter).length-1,0)),new h.d(i,k+t.normalizeIndentation(_.afterEnter),0,O,!0)}}return e._typeCommand(i,"\n"+t.normalizeIndentation(m),r)}},{key:"_isAutoIndentType",value:function(e,t,n){if(e.autoIndent<4)return!1;for(var r=0,i=n.length;r2?c.charCodeAt(l.column-2):0)&&u)return!1;if("auto"===e.autoClosingOvertype){for(var d=!1,h=0,f=r.length;h=0||n.indexOf(t)>=0}},{key:"_isBeforeClosingBrace",value:function(t,n,r){var i=t.autoClosingPairsClose2.get(r);if(!i)return!1;var o,a=e._autoClosingPairIsSymmetric(n),l=Object(s.a)(i);try{for(l.s();!(o=l.n()).done;){var c=o.value,u=e._autoClosingPairIsSymmetric(c);if(a||!u)return!0}}catch(d){l.e(d)}finally{l.f()}return!1}},{key:"_findAutoClosingPairOpen",value:function(e,t,n,r){var i=e.autoClosingPairsOpen2.get(r);if(!i)return null;var o,a=null,l=Object(s.a)(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(null===a||c.open.length>a.open.length){var u,d=!0,h=Object(s.a)(n);try{for(h.s();!(u=h.n()).done;){var f=u.value;if(t.getValueInRange(new p.a(f.lineNumber,f.column-c.open.length+1,f.lineNumber,f.column))+r!==c.open){d=!1;break}}}catch(g){h.e(g)}finally{h.f()}d&&(a=c)}}}catch(g){l.e(g)}finally{l.f()}return a}},{key:"_isAutoClosingOpenCharType",value:function(t,n,r,i,o){var a=Object(v.g)(i),s=a?t.autoClosingQuotes:t.autoClosingBrackets;if("never"===s)return null;var l=this._findAutoClosingPairOpen(t,n,r.map((function(e){return e.getPosition()})),i);if(!l)return null;for(var c=a?t.shouldAutoCloseBefore.quote:t.shouldAutoCloseBefore.bracket,d=0,h=r.length;dp.column-1){var m=g.charAt(p.column-1);if(!e._isBeforeClosingBrace(t,l,m)&&!c(m))return null}if(!n.isCheapToTokenize(p.lineNumber))return null;if(1===l.open.length&&a&&"always"!==s){var b=Object(_.a)(t.wordSeparators);if(o&&p.column>1&&0===b.get(g.charCodeAt(p.column-2)))return null;if(!o&&p.column>2&&0===b.get(g.charCodeAt(p.column-3)))return null}n.forceTokenization(p.lineNumber);var S=n.getLineTokens(p.lineNumber),C=!1;try{C=y.a.shouldAutoClosePair(l,S,o?p.column:p.column-1)}catch(k){Object(u.e)(k)}if(!C)return null}return l}},{key:"_runAutoClosingOpenCharType",value:function(e,t,n,r,i,o,a){for(var s=[],l=0,c=r.length;l, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}},{key:"collapseSelection",value:function(){return new e(this.value,this.value.length,this.value.length,null,null)}},{key:"writeToTextArea",value:function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}},{key:"deduceEditorPosition",value:function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){var n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,1)}var r=this.value.substring(this.selectionStart,e);if(-1===r.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,r,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}},{key:"_finishDeduceEditorPosition",value:function(e,t,n){for(var r=0,i=-1;-1!==(i=t.indexOf("\n",i+1));)r++;return[e,n*t.length,r]}}],[{key:"readFromTextArea",value:function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)}},{key:"selectedText",value:function(t){return new e(t,0,t.length,null,null)}},{key:"deduceInput",value:function(e,t,n){if(!e)return{text:"",replaceCharCnt:0};var r=e.value,i=e.selectionStart,a=e.selectionEnd,s=t.value,l=t.selectionStart,c=t.selectionEnd,u=r.substring(a),d=s.substring(c),h=o.e(u,d);s=s.substring(0,s.length-h);var f=(r=r.substring(0,r.length-h)).substring(0,i),p=s.substring(0,l),g=o.d(f,p);if(s=s.substring(g),r=r.substring(g),l-=g,i-=g,c-=g,a-=g,n&&l===c&&r.length>0){var m=null;if(l===s.length?o.S(s,r)&&(m=s.substring(r.length)):o.s(s,r)&&(m=s.substring(0,s.length-r.length)),null!==m&&m.length>0&&(/\uFE0F/.test(m)||o.k(m)))return{text:m,replaceCharCnt:0}}return l===c?r===s&&0===i&&a===r.length&&l===s.length&&-1===s.indexOf("\n")&&o.l(s)?{text:"",replaceCharCnt:0}:{text:s,replaceCharCnt:f.length-g}:{text:s,replaceCharCnt:a-i}}}]),e}();l.EMPTY=new l("",0,0,null,null);var c=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"_getPageOfLine",value:function(e,t){return Math.floor((e-1)/t)}},{key:"_getRangeForPage",value:function(e,t){var n=e*t,r=n+1,i=n+t;return new s.a(r,1,i+1,1)}},{key:"fromEditorSelection",value:function(t,n,r,i,o){var c,u=e._getPageOfLine(r.startLineNumber,i),d=e._getRangeForPage(u,i),h=e._getPageOfLine(r.endLineNumber,i),f=e._getRangeForPage(h,i),p=d.intersectRanges(new s.a(1,1,r.startLineNumber,r.startColumn)),g=n.getValueInRange(p,1),m=n.getLineCount(),v=n.getLineMaxColumn(m),_=f.intersectRanges(new s.a(r.endLineNumber,r.endColumn,m,v)),b=n.getValueInRange(_,1);if(u===h||u+1===h)c=n.getValueInRange(r,1);else{var y=d.intersectRanges(r),S=f.intersectRanges(r);c=n.getValueInRange(y,1)+String.fromCharCode(8230)+n.getValueInRange(S,1)}if(o){var C=500;g.length>C&&(g=g.substring(g.length-C,g.length)),b.length>C&&(b=b.substring(0,C)),c.length>1e3&&(c=c.substring(0,C)+String.fromCharCode(8230)+c.substring(c.length-C,c.length))}return new l(g+c+b,g.length,g.length+c.length,new a.a(r.startLineNumber,r.startColumn),new a.a(r.endLineNumber,r.endColumn))}}]),e}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ServerStyleSheet",(function(){return Be})),n.d(t,"StyleSheetConsumer",(function(){return ie})),n.d(t,"StyleSheetContext",(function(){return re})),n.d(t,"StyleSheetManager",(function(){return ue})),n.d(t,"ThemeConsumer",(function(){return Le})),n.d(t,"ThemeContext",(function(){return De})),n.d(t,"ThemeProvider",(function(){return Ae})),n.d(t,"__PRIVATE__",(function(){return ze})),n.d(t,"createGlobalStyle",(function(){return je})),n.d(t,"css",(function(){return be})),n.d(t,"isStyledComponent",(function(){return y})),n.d(t,"keyframes",(function(){return Fe})),n.d(t,"useTheme",(function(){return He})),n.d(t,"version",(function(){return C})),n.d(t,"withTheme",(function(){return Ue}));var r=n(275),i=n(28),o=n.n(i),a=n(431),s=n.n(a),l=n(432),c=n(433),u=n(312),d=n(311),h=n.n(d);function f(){return(f=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&O(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(S))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.2.1");var a=F();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},U=function(){function e(e){var t=this.element=B(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),r+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),q=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Y(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(q,"$1-$2")}var $=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Q=function(e){return $(5381,e)};function Z(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);t.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=$(this.baseHash,n.hash),u="",d=0;d>>0);if(!t.hasNameForId(r,g)){var m=n(u,"."+g,void 0,r);t.insertRules(r,g,m)}i.push(g)}}return i.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,i,o=void 0===e?v:e,a=o.options,s=void 0===a?v:a,c=o.plugins,u=void 0===c?m:c,d=new l.a(s),h=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,l,c,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),p=function(e,r,o){return 0===r&&te.includes(o[n.length])||o.match(i)?e:"."+t};function g(e,o,a,s){void 0===s&&(s="&");var l=e.replace(ee,""),c=o&&a?a+" "+o+" { "+l+" }":l;return t=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),d(a||!o?"":o,c)}return d.use([].concat(u,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(-2===e){var t=h;return h=[],t}}])),g.hash=u.length?u.reduce((function(e,t){return t.name||O(15),$(e,t.name)}),5381).toString():"",g}var re=o.a.createContext(),ie=re.Consumer,oe=o.a.createContext(),ae=(oe.Consumer,new G),se=ne();function le(){return Object(i.useContext)(re)||ae}function ce(){return Object(i.useContext)(oe)||se}function ue(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],a=le(),l=Object(i.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=Object(i.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.a.createElement(re.Provider,{value:l},o.a.createElement(oe.Provider,{value:c},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return O(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),he=/([A-Z])/,fe=/([A-Z])/g,pe=/^ms-/,ge=function(e){return"-"+e.toLowerCase()};function me(e){return he.test(e)?e.replace(fe,ge).replace(pe,"-ms-"):e}var ve=function(e){return null==e||!1===e||""===e};function _e(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Ce=/(^-|-$)/g;function ke(e){return e.replace(Se,"-").replace(Ce,"")}var Ee=function(e){return Y(Q(e)>>>0)};function we(e){return"string"==typeof e&&!0}var Oe=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Te=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function xe(e,t,n){var r=e[n];Oe(t)&&Oe(r)?Ne(r,t):e[n]=t}function Ne(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(we(e)?e:ke(b(e)));return Re(e,f({},i,{attrs:C,componentId:o}),n)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ne({},e.defaultProps,t):t}}),E.toString=function(){return"."+E.styledComponentId},a&&h()(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var Me=function(e){return function e(t,n,i){if(void 0===i&&(i=v),!Object(r.isValidElementType)(n))return O(1,String(n));var o=function(){return t(n,i,be.apply(void 0,arguments))};return o.withConfig=function(r){return e(t,n,f({},i,{},r))},o.attrs=function(r){return e(t,n,f({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Re,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Me[e]=Me(e)}));var Pe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Z(e),G.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(_e(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&G.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?O(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return O(2);var n=((t={})[S]="",t["data-styled-version"]="5.2.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=F();return r&&(n.nonce=r),[o.a.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new G({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?O(2):o.a.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return O(3)},e}(),Ue=function(e){var t=o.a.forwardRef((function(t,n){var r=Object(i.useContext)(De),a=e.defaultProps,s=ye(t,r,a);return o.a.createElement(e,f({},t,{theme:s,ref:n}))}));return h()(t,e),t.displayName="WithTheme("+b(e)+")",t},He=function(){return Object(i.useContext)(De)},ze={StyleSheet:G,masterSheet:ae};t.default=Me}.call(this,n(200))},function(e,t,n){"use strict";e.exports=function(e,t){var n,i,o=t.children||[],a=o.length,s=[],l=-1;for(;++l1&&void 0!==arguments[1])||arguments[1];this.registerConfigurations([e],t)}},{key:"registerConfigurations",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=[];e.forEach((function(e){r.push.apply(r,Object(i.a)(t.validateAndRegisterProperties(e,n))),t.configurationContributors.push(e),t.registerJSONConfiguration(e)})),y.registerSchema(b,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(r)}},{key:"registerOverrideIdentifiers",value:function(e){var t,n=Object(r.a)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.overrideIdentifiers.add(i)}}catch(o){n.e(o)}finally{n.f()}this.updateOverridePropertyPatternKey()}},{key:"validateAndRegisterProperties",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;n=u.l(e.scope)?n:e.scope;var o=[],a=e.properties;if(a)for(var s in a)if(t&&w(s))delete a[s];else{var l=a[s];this.updatePropertyDefaultValue(s,l),C.test(s)?l.scope=void 0:l.scope=u.l(l.scope)?n:l.scope,!a[s].hasOwnProperty("included")||a[s].included?(this.configurationProperties[s]=a[s],!a[s].deprecationMessage&&a[s].markdownDeprecationMessage&&(a[s].deprecationMessage=a[s].markdownDeprecationMessage),o.push(s)):(this.excludedConfigurationProperties[s]=a[s],delete a[s])}var c=e.allOf;if(c){var d,h=Object(r.a)(c);try{for(h.s();!(d=h.n()).done;){var f=d.value;o.push.apply(o,Object(i.a)(this.validateAndRegisterProperties(f,t,n)))}}catch(p){h.e(p)}finally{h.f()}}return o}},{key:"getConfigurationProperties",value:function(){return this.configurationProperties}},{key:"registerJSONConfiguration",value:function(e){var t=this;!function e(n){var r=n.properties;if(r)for(var i in r)t.updateSchema(i,r[i]);var o=n.allOf;o&&o.forEach(e)}(e)}},{key:"updateSchema",value:function(e,t){switch(f.properties[e]=t,t.scope){case 1:p.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:m.properties[e]=t;break;case 3:v.properties[e]=t;break;case 4:_.properties[e]=t;break;case 5:_.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}},{key:"updateOverridePropertyPatternKey",value:function(){var e,t=Object(r.a)(this.overrideIdentifiers.values());try{for(t.s();!(e=t.n()).done;){var n=e.value,i="[".concat(n,"]"),o={type:"object",description:s.a("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:s.a("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:b};this.updatePropertyDefaultValue(i,o),f.properties[i]=o,p.properties[i]=o,g.properties[i]=o,m.properties[i]=o,v.properties[i]=o,_.properties[i]=o}}catch(a){t.e(a)}finally{t.f()}this._onDidSchemaChange.fire()}},{key:"updatePropertyDefaultValue",value:function(e,t){var n=this.defaultValues[e];u.k(n)&&(n=t.default),u.k(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n}}]),e}(),C=new RegExp("\\[.*\\]$");function k(e){return e.substring(1,e.length-1)}var E=new S;function w(e){return C.test(e)?s.a("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==E.getConfigurationProperties()[e]?s.a("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null}c.a.add(h.Configuration,E)},function(e,t,n){"use strict";function r(e){return e<0?0:e>255?255:0|e}function i(e){return e<0?0:e>4294967295?4294967295:0|e}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f}));var r=n(4),i=n(5),o=n(0),a=n(1),s=n(15),l=n(35),c=n(123),u=n(19),d=n(8),h=function(){function e(){Object(o.a)(this,e)}return Object(a.a)(e,null,[{key:"_createWord",value:function(e,t,n,r,i){return{start:r,end:i,wordType:t,nextCharClass:n}}},{key:"_findPreviousWordOnLine",value:function(e,t,n){var r=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(r,e,n)}},{key:"_doFindPreviousWordOnLine",value:function(e,t,n){for(var r=0,i=n.column-2;i>=0;i--){var o=e.charCodeAt(i),a=t.get(o);if(0===a){if(2===r)return this._createWord(e,r,a,i+1,this._findEndOfWord(e,t,r,i+1));r=1}else if(2===a){if(1===r)return this._createWord(e,r,a,i+1,this._findEndOfWord(e,t,r,i+1));r=2}else if(1===a&&0!==r)return this._createWord(e,r,a,i+1,this._findEndOfWord(e,t,r,i+1))}return 0!==r?this._createWord(e,r,1,0,this._findEndOfWord(e,t,r,0)):null}},{key:"_findEndOfWord",value:function(e,t,n,r){for(var i=e.length,o=r;o=0;i--){var o=e.charCodeAt(i),a=t.get(o);if(1===a)return i+1;if(1===n&&2===a)return i+1;if(2===n&&0===a)return i+1}return 0}},{key:"moveWordLeft",value:function(t,n,r,i){var o=r.lineNumber,a=r.column;1===a&&o>1&&(o-=1,a=n.getLineMaxColumn(o));var s=e._findPreviousWordOnLine(t,n,new u.a(o,a));if(0===i)return new u.a(o,s?s.start+1:1);if(1===i)return s&&2===s.wordType&&s.end-s.start===1&&0===s.nextCharClass&&(s=e._findPreviousWordOnLine(t,n,new u.a(o,s.start+1))),new u.a(o,s?s.start+1:1);if(3===i){for(;s&&2===s.wordType;)s=e._findPreviousWordOnLine(t,n,new u.a(o,s.start+1));return new u.a(o,s?s.start+1:1)}return s&&a<=s.end+1&&(s=e._findPreviousWordOnLine(t,n,new u.a(o,s.start+1))),new u.a(o,s?s.end+1:1)}},{key:"_moveWordPartLeft",value:function(e,t){var n=t.lineNumber,r=e.getLineMaxColumn(n);if(1===t.column)return n>1?new u.a(n-1,e.getLineMaxColumn(n-1)):t;for(var i=e.getLineContent(n),o=t.column-1;o>1;o--){var a=i.charCodeAt(o-2),l=i.charCodeAt(o-1);if(95===a&&95!==l)return new u.a(n,o);if(s.H(a)&&s.I(l))return new u.a(n,o);if(s.I(a)&&s.I(l)&&o+1=l.start+1&&(l=e._findNextWordOnLine(t,n,new u.a(o,l.end+1))),a=l?l.start+1:n.getLineMaxColumn(o);return new u.a(o,a)}},{key:"_moveWordPartRight",value:function(e,t){var n=t.lineNumber,r=e.getLineMaxColumn(n);if(t.column===r)return n1?l=1:(s--,l=n.getLineMaxColumn(s)):(h&&l<=h.end+1&&(h=e._findPreviousWordOnLine(t,n,new u.a(s,h.start+1))),h?l=h.end+1:l>1?l=1:(s--,l=n.getLineMaxColumn(s))),new d.a(s,l,a.lineNumber,a.column)}},{key:"_deleteWordPartLeft",value:function(t,n){if(!n.isEmpty())return n;var r=n.getPosition(),i=e._moveWordPartLeft(t,r);return new d.a(r.lineNumber,r.column,i.lineNumber,i.column)}},{key:"_findFirstNonWhitespaceChar",value:function(e,t){for(var n=e.length,r=t;r=p.start+1&&(p=e._findNextWordOnLine(t,n,new u.a(s,p.end+1))),p?l=p.start+1:l1)if(a.a.visibleColumnFromColumn(_,b+1,u)%h!==0&&t.isCheapToTokenize(v-1)){var y=c.a.getEnterAction(this._opts.autoIndent,t,new s.a(v-1,t.getLineMaxColumn(v-1),v-1,t.getLineMaxColumn(v-1)));if(y){if(m=g,y.appendText)for(var S=0,C=y.appendText.length;S=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:{};Object(u.a)(this,e);var s=function(){return o.model},l=i.map((function(e){return new _(e,s)}));this.list=new g.c(t,n,r,l,y(s,a))}return Object(d.a)(e,[{key:"updateOptions",value:function(e){this.list.updateOptions(e)}},{key:"getHTMLElement",value:function(){return this.list.getHTMLElement()}},{key:"getFocus",value:function(){return this.list.getFocus()}},{key:"setSelection",value:function(e,t){this.list.setSelection(e,t)}},{key:"getSelection",value:function(){return this.list.getSelection()}},{key:"style",value:function(e){this.list.style(e)}},{key:"dispose",value:function(){this.list.dispose()}},{key:"onDidFocus",get:function(){return this.list.onDidFocus}},{key:"onDidDispose",get:function(){return this.list.onDidDispose}},{key:"onMouseDblClick",get:function(){var e=this;return m.b.map(this.list.onMouseDblClick,(function(t){var n=t.element,r=t.index,i=t.browserEvent;return{element:void 0===n?void 0:e._model.get(n),index:r,browserEvent:i}}))}},{key:"onPointer",get:function(){var e=this;return m.b.map(this.list.onPointer,(function(t){var n=t.element,r=t.index,i=t.browserEvent;return{element:void 0===n?void 0:e._model.get(n),index:r,browserEvent:i}}))}},{key:"onDidChangeFocus",get:function(){var e=this;return m.b.map(this.list.onDidChangeFocus,(function(t){var n=t.elements,r=t.indexes,i=t.browserEvent;return{elements:n.map((function(t){return e._model.get(t)})),indexes:r,browserEvent:i}}))}},{key:"onDidChangeSelection",get:function(){var e=this;return m.b.map(this.list.onDidChangeSelection,(function(t){var n=t.elements,r=t.indexes,i=t.browserEvent;return{elements:n.map((function(t){return e._model.get(t)})),indexes:r,browserEvent:i}}))}},{key:"model",get:function(){return this._model},set:function(e){this._model=e,this.list.splice(0,this.list.length,Object(p.s)(e.length))}}]),e}(),k=n(2),E=n(62),w=n(140),O=n(18),T=n(29),x=n(60),N=n(65),D=n(97),L=n(30),A=n(55),I=n(6),R=n(27),M=(n(477),n(75)),P=n(164);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(S||(S={}));var j=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){return Object(u.a)(this,n),t.call(this,"TreeError [".concat(e,"] ").concat(r))}return n}(Object(P.a)(Error)),F=function(){function e(t){Object(u.a)(this,e),this.fn=t,this._map=new WeakMap}return Object(d.a)(e,[{key:"map",value:function(e){var t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}]),e}(),B=n(135),U=n(190),H=n(52),z=n(79),V=n(264),W=n(266),G=n(184),q=n(265);function K(e){return Object(V.a)(e)||Object(W.a)(e)||Object(G.a)(e)||Object(q.a)()}function Y(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function $(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function Q(e){return"boolean"===typeof e.collapsible}var Z=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(u.a)(this,e),this.user=t,this.list=n,this.rootRef=[],this.eventBufferer=new m.c,this._onDidChangeCollapseState=new m.a,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new m.a,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new m.a,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault="undefined"!==typeof i.collapseByDefault&&i.collapseByDefault,this.filter=i.filter,this.autoExpandSingleChildren="undefined"!==typeof i.autoExpandSingleChildren&&i.autoExpandSingleChildren,this.root={parent:void 0,element:r,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}return Object(d.a)(e,[{key:"splice",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A.a.empty(),o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;if(0===e.length)throw new j(this.user,"Invalid tree location");for(var s=this.getParentNodeWithListIndex(e),l=s.parentNode,c=s.listIndex,u=s.revealed,d=s.visible,h=[],f=A.a.map(i,(function(e){return r.createTreeNode(e,l,l.visible?1:0,u,h,o)})),p=e[e.length-1],g=0,m=p;m>=0&&m0&&a){var R=function e(t){a(t),t.children.forEach(e)};w.forEach(R)}this._onDidSplice.fire({insertedNodes:b,deletedNodes:w});for(var M=l;M;){if(2===M.visibility){this.refilter();break}M=M.parent}}},{key:"rerender",value:function(e){if(0===e.length)throw new j(this.user,"Invalid tree location");var t=this.getTreeNodeWithListIndex(e),n=t.node,r=t.listIndex,i=t.revealed;n.visible&&i&&this.list.splice(r,1,[n])}},{key:"has",value:function(e){return this.hasTreeNode(e)}},{key:"getListIndex",value:function(e){var t=this.getTreeNodeWithListIndex(e),n=t.listIndex,r=t.visible,i=t.revealed;return r&&i?n:-1}},{key:"getListRenderCount",value:function(e){return this.getTreeNode(e).renderNodeCount}},{key:"isCollapsible",value:function(e){return this.getTreeNode(e).collapsible}},{key:"setCollapsible",value:function(e,t){var n=this,r=this.getTreeNode(e);"undefined"===typeof t&&(t=!r.collapsible);var i={collapsible:t};return this.eventBufferer.bufferEvents((function(){return n._setCollapseState(e,i)}))}},{key:"isCollapsed",value:function(e){return this.getTreeNode(e).collapsed}},{key:"setCollapsed",value:function(e,t,n){var r=this,i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsed);var o={collapsed:t,recursive:n||!1};return this.eventBufferer.bufferEvents((function(){return r._setCollapseState(e,o)}))}},{key:"_setCollapseState",value:function(e,t){var n=this.getTreeNodeWithListIndex(e),r=n.node,i=n.listIndex,o=n.revealed,a=this._setListNodeCollapseState(r,i,o,t);if(r!==this.root&&this.autoExpandSingleChildren&&a&&!Q(t)&&r.collapsible&&!r.collapsed&&!t.recursive){for(var s=-1,l=0;l-1){s=-1;break}s=l}}s>-1&&this._setCollapseState([].concat(Object(R.a)(e),[s]),t)}return a}},{key:"_setListNodeCollapseState",value:function(e,t,n,r){var i=this._setNodeCollapseState(e,r,!1);if(!n||!e.visible||!i)return i;var o=e.renderNodeCount,a=this.updateNodeAfterCollapseChange(e),s=o-(-1===t?0:1);return this.list.splice(t+1,s,a.slice(1)),i}},{key:"_setNodeCollapseState",value:function(e,t,n){var r;if(e===this.root?r=!1:(Q(t)?(r=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(r=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):r=!1,r&&this._onDidChangeCollapseState.fire({node:e,deep:n})),!Q(t)&&t.recursive){var i,o=Object(I.a)(e.children);try{for(o.s();!(i=o.n()).done;){var a=i.value;r=this._setNodeCollapseState(a,t,!0)||r}}catch(s){o.e(s)}finally{o.f()}}return r}},{key:"expandTo",value:function(e){var t=this;this.eventBufferer.bufferEvents((function(){for(var n=t.getTreeNode(e);n.parent;)n=n.parent,e=e.slice(0,e.length-1),n.collapsed&&t._setCollapseState(e,{collapsed:!1,recursive:!1})}))}},{key:"refilter",value:function(){var e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}},{key:"createTreeNode",value:function(e,t,n,r,i,o){var a=this,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},l=this._filterNode(s,n);s.visibility=l,r&&i.push(s);var c,u=e.children||A.a.empty(),d=r&&0!==l&&!s.collapsed,h=A.a.map(u,(function(e){return a.createTreeNode(e,s,l,d,i,o)})),f=0,p=1,g=Object(I.a)(h);try{for(g.s();!(c=g.n()).done;){var m=c.value;s.children.push(m),p+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=f++)}}catch(v){g.e(v)}finally{g.f()}return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=f,s.visible=2===l?f>0:1===l,s.visible?s.collapsed||(s.renderNodeCount=p):(s.renderNodeCount=0,r&&i.pop()),o&&o(s),s}},{key:"updateNodeAfterCollapseChange",value:function(e){var t=e.renderNodeCount,n=[];return this._updateNodeAfterCollapseChange(e,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}},{key:"_updateNodeAfterCollapseChange",value:function(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed){var n,r=Object(I.a)(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t)}}catch(o){r.e(o)}finally{r.f()}}return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}},{key:"updateNodeAfterFilterChange",value:function(e){var t=e.renderNodeCount,n=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,n),this._updateAncestorsRenderNodeCount(e.parent,n.length-t),n}},{key:"_updateNodeAfterFilterChange",value:function(e,t,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e!==this.root){if(0===(r=this._filterNode(e,t)))return e.visible=!1,e.renderNodeCount=0,!1;i&&n.push(e)}var o=n.length;e.renderNodeCount=e===this.root?0:1;var a=!1;if(e.collapsed&&0===r)e.visibleChildrenCount=0;else{var s,l=0,c=Object(I.a)(e.children);try{for(c.s();!(s=c.n()).done;){var u=s.value;a=this._updateNodeAfterFilterChange(u,r,n,i&&!e.collapsed)||a,u.visible&&(u.visibleChildIndex=l++)}}catch(d){c.e(d)}finally{c.f()}e.visibleChildrenCount=l}return e!==this.root&&(e.visible=2===r?a:1===r),e.visible?e.collapsed||(e.renderNodeCount+=n.length-o):(e.renderNodeCount=0,i&&n.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}},{key:"_updateAncestorsRenderNodeCount",value:function(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}},{key:"_filterNode",value:function(e,t){var n=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof n?(e.filterData=void 0,n?1:0):Y(n)?(e.filterData=n.data,$(n.visibility)):(e.filterData=void 0,$(n))}},{key:"hasTreeNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root;if(!e||0===e.length)return!0;var n=K(e),r=n[0],i=n.slice(1);return!(r<0||r>t.children.length)&&this.hasTreeNode(i,t.children[r])}},{key:"getTreeNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root;if(!e||0===e.length)return t;var n=K(e),r=n[0],i=n.slice(1);if(r<0||r>t.children.length)throw new j(this.user,"Invalid tree location");return this.getTreeNode(i,t.children[r])}},{key:"getTreeNodeWithListIndex",value:function(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};var t=this.getParentNodeWithListIndex(e),n=t.parentNode,r=t.listIndex,i=t.revealed,o=t.visible,a=e[e.length-1];if(a<0||a>n.children.length)throw new j(this.user,"Invalid tree location");var s=n.children[a];return{node:s,listIndex:r,revealed:i,visible:o&&s.visible}}},{key:"getParentNodeWithListIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=K(e),a=o[0],s=o.slice(1);if(a<0||a>t.children.length)throw new j(this.user,"Invalid tree location");for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];return this.getTreeNode(e)}},{key:"getNodeLocation",value:function(e){for(var t=[],n=e;n.parent;)t.push(n.parent.children.indexOf(n)),n=n.parent;return t.reverse()}},{key:"getParentNodeLocation",value:function(e){return 0===e.length?void 0:1===e.length?[]:Object(p.u)(e)[0]}}]),e}(),X=n(32),J=n(21),ee=n(124),te=n(271),ne=n(26),re=Object(ne.e)("tree-item-expanded",ne.a.chevronDown),ie=Object(ne.e)("tree-filter-on-type-on",ne.a.listFilter),oe=Object(ne.e)("tree-filter-on-type-off",ne.a.listSelection),ae=Object(ne.e)("tree-filter-clear",ne.a.close),se=Object(ne.e)("tree-item-loading",ne.a.loading),le=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e.elements.map((function(e){return e.element})))).data=e,r}return n}(U.a);function ce(e){return e instanceof U.a?new le(e):e}var ue=function(){function e(t,n){Object(u.a)(this,e),this.modelProvider=t,this.dnd=n,this.autoExpandDisposable=f.a.None}return Object(d.a)(e,[{key:"getDragURI",value:function(e){return this.dnd.getDragURI(e.element)}},{key:"getDragLabel",value:function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((function(e){return e.element})),t)}},{key:"onDragStart",value:function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(ce(e),t)}},{key:"onDragOver",value:function(e,t,n,r){var i=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.dnd.onDragOver(ce(e),t&&t.element,n,r),s=this.autoExpandNode!==t;if(s&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return a;if(s&&"boolean"!==typeof a&&a.autoExpand&&(this.autoExpandDisposable=Object(X.g)((function(){var e=i.modelProvider(),n=e.getNodeLocation(t);e.isCollapsed(n)&&e.setCollapsed(n,!1),i.autoExpandNode=void 0}),500)),"boolean"===typeof a||!a.accept||"undefined"===typeof a.bubble||a.feedback){if(!o){var l="boolean"===typeof a?a:a.accept,c="boolean"===typeof a?void 0:a.effect;return{accept:l,effect:c,feedback:[n]}}return a}if(1===a.bubble){var u=this.modelProvider(),d=u.getNodeLocation(t),h=u.getParentNodeLocation(d),f=u.getNode(h),g=h&&u.getListIndex(h);return this.onDragOver(e,f,g,r,!1)}var m=this.modelProvider(),v=m.getNodeLocation(t),_=m.getListIndex(v),b=m.getListRenderCount(v);return Object.assign(Object.assign({},a),{feedback:Object(p.s)(_,_+b)})}},{key:"drop",value:function(e,t,n,r){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(ce(e),t&&t.element,n,r)}},{key:"onDragEnd",value:function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}]),e}();function de(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:function(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new ue(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent:function(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent:function(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize:function(t){var n=e(),r=n.getNodeLocation(t),i=n.getParentNodeLocation(r);return n.getNode(i).visibleChildrenCount},getPosInSet:function(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?function(e){return t.accessibilityProvider.isChecked(e.element)}:void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?function(e){return t.accessibilityProvider.getRole(e.element)}:function(){return"treeitem"},getAriaLabel:function(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel:function(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?function(){return t.accessibilityProvider.getWidgetRole()}:function(){return"tree"},getAriaLevel:function(e){return e.depth},getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&function(e){return t.accessibilityProvider.getActiveDescendantId(e.element)}}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:function(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}var he,fe=function(){function e(t){Object(u.a)(this,e),this.delegate=t}return Object(d.a)(e,[{key:"getHeight",value:function(e){return this.delegate.getHeight(e.element)}},{key:"getTemplateId",value:function(e){return this.delegate.getTemplateId(e.element)}},{key:"hasDynamicHeight",value:function(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}},{key:"setDynamicHeight",value:function(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}]),e}();!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(he||(he={}));var pe=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object(u.a)(this,e),this._elements=r,this.onDidChange=m.b.forEach(t,(function(e){return n._elements=e}))}return Object(d.a)(e,[{key:"elements",get:function(){return this._elements}}]),e}(),ge=function(){function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Object(u.a)(this,e),this.renderer=t,this.modelProvider=n,this.activeNodes=i,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=e.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new te.a,this.activeIndentNodes=new Set,this.indentGuidesDisposable=f.a.None,this.disposables=new f.b,this.templateId=t.templateId,this.updateOptions(o),m.b.map(r,(function(e){return e.node}))(this.onDidChangeNodeTwistieState,this,this.disposables),t.onDidChangeTwistieState&&t.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}return Object(d.a)(e,[{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"!==typeof e.indent&&(this.indent=Object(ee.b)(e.indent,0,40)),"undefined"!==typeof e.renderIndentGuides){var t=e.renderIndentGuides!==he.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){var n=new f.b;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,n),this.indentGuidesDisposable=n,this._onDidChangeActiveNodes(this.activeNodes.elements)}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}},{key:"renderTemplate",value:function(e){var t=Object(h.append)(e,Object(h.$)(".monaco-tl-row")),n=Object(h.append)(t,Object(h.$)(".monaco-tl-indent")),r=Object(h.append)(t,Object(h.$)(".monaco-tl-twistie")),i=Object(h.append)(t,Object(h.$)(".monaco-tl-contents")),o=this.renderer.renderTemplate(i);return{container:e,indent:n,twistie:r,indentGuidesDisposable:f.a.None,templateData:o}}},{key:"renderElement",value:function(t,n,r,i){"number"===typeof i&&(this.renderedNodes.set(t,{templateData:r,height:i}),this.renderedElements.set(t.element,t));var o=e.DefaultIndent+(t.depth-1)*this.indent;r.twistie.style.paddingLeft="".concat(o,"px"),r.indent.style.width="".concat(o+this.indent-16,"px"),this.renderTwistie(t,r),"number"===typeof i&&this.renderIndentGuides(t,r),this.renderer.renderElement(t,n,r.templateData,i)}},{key:"disposeElement",value:function(e,t,n,r){n.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.templateData,r),"number"===typeof r&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}},{key:"disposeTemplate",value:function(e){this.renderer.disposeTemplate(e.templateData)}},{key:"onDidChangeTwistieState",value:function(e){var t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}},{key:"onDidChangeNodeTwistieState",value:function(e){var t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}},{key:"renderTwistie",value:function(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e.element,t.twistie),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(Object(h.addClasses)(t.twistie,re.classNames,"collapsible"),Object(h.toggleClass)(t.twistie,"collapsed",e.collapsed)):Object(h.removeClasses)(t.twistie,re.classNames,"collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}},{key:"renderIndentGuides",value:function(e,t){var n=this;if(Object(h.clearNode)(t.indent),t.indentGuidesDisposable.dispose(),this.shouldRenderIndentGuides){for(var r=new f.b,i=this.modelProvider(),o=e,a=function(){var e=i.getNodeLocation(o),a=i.getParentNodeLocation(e);if(!a)return"break";var s=i.getNode(a),l=Object(h.$)(".indent-guide",{style:"width: ".concat(n.indent,"px")});n.activeIndentNodes.has(s)&&Object(h.addClass)(l,"active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),n.renderedIndentGuides.add(s,l),r.add(Object(f.h)((function(){return n.renderedIndentGuides.delete(s,l)}))),o=s};;){if("break"===a())break}t.indentGuidesDisposable=r}}},{key:"_onDidChangeActiveNodes",value:function(e){var t=this;if(this.shouldRenderIndentGuides){var n=new Set,r=this.modelProvider();e.forEach((function(e){var t=r.getNodeLocation(e);try{var i=r.getParentNodeLocation(t);e.collapsible&&e.children.length>0&&!e.collapsed?n.add(e):i&&n.add(r.getNode(i))}catch(o){}})),this.activeIndentNodes.forEach((function(e){n.has(e)||t.renderedIndentGuides.forEach(e,(function(e){return Object(h.removeClass)(e,"active")}))})),n.forEach((function(e){t.activeIndentNodes.has(e)||t.renderedIndentGuides.forEach(e,(function(e){return Object(h.addClass)(e,"active")}))})),this.activeIndentNodes=n}}},{key:"dispose",value:function(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Object(f.f)(this.disposables)}}]),e}();ge.DefaultIndent=8;var me=function(){function e(t,n,r){Object(u.a)(this,e),this.tree=t,this.keyboardNavigationLabelProvider=n,this._filter=r,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new f.b,t.onWillRefilter(this.reset,this,this.disposables)}return Object(d.a)(e,[{key:"filter",value:function(e,t){if(this._filter){var n=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return n;if(0===("boolean"===typeof n?n?1:0:Y(n)?$(n.visibility):n))return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:z.a.Default,visibility:!0};var r=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),i=r&&r.toString();if("undefined"===typeof i)return{data:z.a.Default,visibility:!0};var o=Object(z.d)(this._pattern,this._lowercasePattern,0,i,i.toLowerCase(),0,!0);return o?(this._matchCount++,{data:o,visibility:!0}):this.tree.options.filterOnType?2:{data:z.a.Default,visibility:!0}}},{key:"reset",value:function(){this._totalCount=0,this._matchCount=0}},{key:"dispose",value:function(){Object(f.f)(this.disposables)}},{key:"totalCount",get:function(){return this._totalCount}},{key:"matchCount",get:function(){return this._matchCount}},{key:"pattern",set:function(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}}]),e}(),ve=function(){function e(t,n,r,i,o){Object(u.a)(this,e),this.tree=t,this.view=r,this.filter=i,this.keyboardNavigationDelegate=o,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new m.a,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new m.a,this.enabledDisposables=new f.b,this.disposables=new f.b,this.domNode=Object(h.$)(".monaco-list-type-filter.".concat(this.positionClassName)),this.domNode.draggable=!0,Object(H.a)(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=Object(h.append)(r.getHTMLElement(),Object(h.$)(".monaco-list-type-filter-message")),this.labelDomNode=Object(h.append)(this.domNode,Object(h.$)("span.label"));var a=Object(h.append)(this.domNode,Object(h.$)(".controls"));this._filterOnType=!!t.options.filterOnType,this.filterOnTypeDomNode=Object(h.append)(a,Object(h.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),Object(H.a)(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=Object(h.append)(a,Object(h.$)("button.clear"+ae.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=Object(k.a)("clear","Clear"),this.keyboardNavigationEventFilter=t.options.keyboardNavigationEventFilter,n.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(t.options)}return Object(d.a)(e,[{key:"updateOptions",value:function(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("")}},{key:"enable",value:function(){var e=this;if(!this._enabled){var t=m.b.chain(Object(H.a)(this.view.getHTMLElement(),"keydown")).filter((function(t){return!Object(g.e)(t.target)||t.target===e.filterOnTypeDomNode})).filter((function(e){return"Dead"!==e.key&&!/^Media/.test(e.key)})).map((function(e){return new M.a(e)})).filter(this.keyboardNavigationEventFilter||function(){return!0}).filter((function(){return e.automaticKeyboardNavigation||e.triggered})).filter((function(t){return e.keyboardNavigationDelegate.mightProducePrintableCharacter(t)&&!(18===t.keyCode||16===t.keyCode||15===t.keyCode||17===t.keyCode)||(e.pattern.length>0||e.triggered)&&(9===t.keyCode||1===t.keyCode)&&!t.altKey&&!t.ctrlKey&&!t.metaKey||1===t.keyCode&&(J.f?t.altKey&&!t.metaKey:t.ctrlKey)&&!t.shiftKey})).forEach((function(e){e.stopPropagation(),e.preventDefault()})).event,n=Object(H.a)(this.clearDomNode,"click");m.b.chain(m.b.any(t,n)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}}},{key:"disable",value:function(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}},{key:"onEventOrInput",value:function(e){"string"===typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(J.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)}},{key:"onInput",value:function(e){var 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,(function(e){return!z.a.isDefault(e.filterData)}));var n=this.tree.getFocus();if(n.length>0){var r=n[0];null===this.tree.getRelativeTop(r)&&this.tree.reveal(r,.5)}this.render(),e||(this.triggered=!1)}},{key:"onDragStart",value:function(){var e=this,t=this.view.getHTMLElement(),n=Object(h.getDomNodePagePosition)(t).left,r=t.clientWidth,i=r/2,o=this.domNode.clientWidth,a=new f.b,s=this.positionClassName,l=function(){switch(s){case"nw":e.domNode.style.top="4px",e.domNode.style.left="4px";break;case"ne":e.domNode.style.top="4px",e.domNode.style.left="".concat(r-o-6,"px")}};l(),Object(h.removeClass)(this.domNode,s),Object(h.addClass)(this.domNode,"dragging"),a.add(Object(f.h)((function(){return Object(h.removeClass)(e.domNode,"dragging")}))),Object(H.a)(document,"dragover")((function(e){e.preventDefault();var t=e.screenX-n;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),s=t0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=Object(k.a)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),Object(h.toggleClass)(this.domNode,"no-matches",e),this.domNode.title=Object(k.a)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}},{key:"shouldAllowFocus",value:function(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!z.a.isDefault(e.filterData))}},{key:"dispose",value:function(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Object(f.f)(this.disposables)}},{key:"enabled",get:function(){return this._enabled}},{key:"pattern",get:function(){return this._pattern}},{key:"filterOnType",get:function(){return this._filterOnType}}]),e}();function _e(e){var t=S.Unknown;return Object(h.hasParentWithClass)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=S.Twistie:Object(h.hasParentWithClass)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=S.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function be(e,t){t(e),e.children.forEach((function(e){return be(e,t)}))}var ye=function(){function e(t){Object(u.a)(this,e),this.identityProvider=t,this.nodes=[],this._onDidChange=new m.a,this.onDidChange=this._onDidChange.event}return Object(d.a)(e,[{key:"set",value:function(e,t){Object(p.g)(this.nodes,e)||this._set(e,!1,t)}},{key:"_set",value:function(e,t,n){if(this.nodes=Object(R.a)(e),this.elements=void 0,this._nodeSet=void 0,!t){var r=this;this._onDidChange.fire({get elements(){return r.get()},browserEvent:n})}}},{key:"get",value:function(){return this.elements||(this.elements=this.nodes.map((function(e){return e.element}))),Object(R.a)(this.elements)}},{key:"getNodes",value:function(){return this.nodes}},{key:"has",value:function(e){return this.nodeSet.has(e)}},{key:"onDidModelSplice",value:function(e){var t=this,n=e.insertedNodes,r=e.deletedNodes;if(!this.identityProvider){var i=this.createNodeSet(),o=function(e){return i.delete(e)};return r.forEach((function(e){return be(e,o)})),void this.set(Object(R.a)(i.values()))}var a=new Set,s=function(e){return a.add(t.identityProvider.getId(e.element).toString())};r.forEach((function(e){return be(e,s)}));var l=new Map,c=function(e){return l.set(t.identityProvider.getId(e.element).toString(),e)};n.forEach((function(e){return be(e,c)}));var u,d=[],h=Object(I.a)(this.nodes);try{for(h.s();!(u=h.n()).done;){var f=u.value,p=this.identityProvider.getId(f.element).toString();if(a.has(p)){var g=l.get(p);g&&d.push(g)}else d.push(f)}}catch(m){h.e(m)}finally{h.f()}this._set(d,!0)}},{key:"createNodeSet",value:function(){var e,t=new Set,n=Object(I.a)(this.nodes);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.add(r)}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"nodeSet",get:function(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}}]),e}(),Se=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;return Object(u.a)(this,n),(i=t.call(this,e)).tree=r,i}return Object(d.a)(n,[{key:"onViewPointer",value:function(e){if(!Object(g.e)(e.browserEvent.target)&&!Object(g.f)(e.browserEvent.target)){var t=e.element;if(!t)return Object(a.a)(Object(s.a)(n.prototype),"onViewPointer",this).call(this,e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return Object(a.a)(Object(s.a)(n.prototype),"onViewPointer",this).call(this,e);var r=e.browserEvent.target,i=Object(h.hasClass)(r,"monaco-tl-twistie")||Object(h.hasClass)(r,"monaco-icon-label")&&Object(h.hasClass)(r,"folder-icon")&&e.browserEvent.offsetX<16,o=!1;if((o="function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick)&&!i)return Object(a.a)(Object(s.a)(n.prototype),"onViewPointer",this).call(this,e);if(this.tree.expandOnlyOnDoubleClick&&2!==e.browserEvent.detail&&!i)return Object(a.a)(Object(s.a)(n.prototype),"onViewPointer",this).call(this,e);if(t.collapsible){var l=this.tree.model,c=l.getNodeLocation(t),u=e.browserEvent.altKey;if(l.setCollapsed(c,void 0,u),o&&i)return}Object(a.a)(Object(s.a)(n.prototype),"onViewPointer",this).call(this,e)}}},{key:"onDoubleClick",value:function(e){Object(h.hasClass)(e.browserEvent.target,"monaco-tl-twistie")||Object(a.a)(Object(s.a)(n.prototype),"onDoubleClick",this).call(this,e)}}]),n}(g.d),Ce=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,o,a,s,l){var c;return Object(u.a)(this,n),(c=t.call(this,e,r,i,o,l)).focusTrait=a,c.selectionTrait=s,c}return Object(d.a)(n,[{key:"createMouseController",value:function(e){return new Se(this,e.tree)}},{key:"splice",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(Object(a.a)(Object(s.a)(n.prototype),"splice",this).call(this,e,t,i),0!==i.length){var o=[],l=[];i.forEach((function(t,n){r.focusTrait.has(t)&&o.push(e+n),r.selectionTrait.has(t)&&l.push(e+n)})),o.length>0&&Object(a.a)(Object(s.a)(n.prototype),"setFocus",this).call(this,Object(p.f)([].concat(Object(R.a)(Object(a.a)(Object(s.a)(n.prototype),"getFocus",this).call(this)),o))),l.length>0&&Object(a.a)(Object(s.a)(n.prototype),"setSelection",this).call(this,Object(p.f)([].concat(Object(R.a)(Object(a.a)(Object(s.a)(n.prototype),"getSelection",this).call(this)),l)))}}},{key:"setFocus",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(a.a)(Object(s.a)(n.prototype),"setFocus",this).call(this,e,t),i||this.focusTrait.set(e.map((function(e){return r.element(e)})),t)}},{key:"setSelection",value:function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(a.a)(Object(s.a)(n.prototype),"setSelection",this).call(this,e,t),i||this.selectionTrait.set(e.map((function(e){return r.element(e)})),t)}}]),n}(g.c),ke=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Object(u.a)(this,e),this._options=a,this.eventBufferer=new m.c,this.disposables=new f.b,this._onWillRefilter=new m.a,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new m.a;var s=new fe(r),l=new m.e,c=new m.e,d=new pe(c.event);this.renderers=i.map((function(e){return new ge(e,(function(){return o.model}),l.event,d,a)}));var p,v,_=Object(I.a)(this.renderers);try{for(_.s();!(p=_.n()).done;){var b=p.value;this.disposables.add(b)}}catch(k){_.e(k)}finally{_.f()}a.keyboardNavigationLabelProvider&&(v=new me(this,a.keyboardNavigationLabelProvider,a.filter),a=Object.assign(Object.assign({},a),{filter:v}),this.disposables.add(v)),this.focus=new ye(a.identityProvider),this.selection=new ye(a.identityProvider),this.view=new Ce(t,n,s,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},de((function(){return o.model}),a)),{tree:this})),this.model=this.createModel(t,this.view,a),l.input=this.model.onDidChangeCollapseState;var y=m.b.forEach(this.model.onDidSplice,(function(e){o.eventBufferer.bufferEvents((function(){o.focus.onDidModelSplice(e),o.selection.onDidModelSplice(e)}))}));if(y((function(){return null}),null,this.disposables),c.input=m.b.chain(m.b.any(y,this.focus.onDidChange,this.selection.onDidChange)).debounce((function(){return null}),0).map((function(){var e,t=new Set,n=Object(I.a)(o.focus.getNodes());try{for(n.s();!(e=n.n()).done;){var r=e.value;t.add(r)}}catch(k){n.e(k)}finally{n.f()}var i,a=Object(I.a)(o.selection.getNodes());try{for(a.s();!(i=a.n()).done;){var s=i.value;t.add(s)}}catch(k){a.e(k)}finally{a.f()}return Object(R.a)(t.values())})).event,!1!==a.keyboardSupport){var S=m.b.chain(this.view.onKeyDown).filter((function(e){return!Object(g.e)(e.target)})).map((function(e){return new M.a(e)}));S.filter((function(e){return 15===e.keyCode})).on(this.onLeftArrow,this,this.disposables),S.filter((function(e){return 17===e.keyCode})).on(this.onRightArrow,this,this.disposables),S.filter((function(e){return 10===e.keyCode})).on(this.onSpace,this,this.disposables)}if(a.keyboardNavigationLabelProvider){var C=a.keyboardNavigationDelegate||g.a;this.typeFilterController=new ve(this,this.model,this.view,v,C),this.focusNavigationFilter=function(e){return o.typeFilterController.shouldAllowFocus(e)},this.disposables.add(this.typeFilterController)}this.styleElement=Object(h.createStyleSheet)(this.view.getHTMLElement()),Object(h.toggleClass)(this.getHTMLElement(),"always",this._options.renderIndentGuides===he.Always)}return Object(d.a)(e,[{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._options=Object.assign(Object.assign({},this._options),e);var t,n=Object(I.a)(this.renderers);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.updateOptions(e)}}catch(i){n.e(i)}finally{n.f()}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),Object(h.toggleClass)(this.getHTMLElement(),"always",this._options.renderIndentGuides===he.Always)}},{key:"getHTMLElement",value:function(){return this.view.getHTMLElement()}},{key:"domFocus",value:function(){this.view.domFocus()}},{key:"layout",value:function(e,t){this.view.layout(e,t)}},{key:"style",value:function(e){var t=".".concat(this.view.domId),n=[];e.treeIndentGuidesStroke&&(n.push(".monaco-list".concat(t,":hover .monaco-tl-indent > .indent-guide, .monaco-list").concat(t,".always .monaco-tl-indent > .indent-guide { border-color: ").concat(e.treeIndentGuidesStroke.transparent(.4),"; }")),n.push(".monaco-list".concat(t," .monaco-tl-indent > .indent-guide.active { border-color: ").concat(e.treeIndentGuidesStroke,"; }")));var r=n.join("\n");r!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=r),this.view.style(e)}},{key:"collapse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.model.setCollapsed(e,!0,t)}},{key:"expand",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.model.setCollapsed(e,!1,t)}},{key:"isCollapsible",value:function(e){return this.model.isCollapsible(e)}},{key:"setCollapsible",value:function(e,t){return this.model.setCollapsible(e,t)}},{key:"isCollapsed",value:function(e){return this.model.isCollapsed(e)}},{key:"refilter",value:function(){this._onWillRefilter.fire(void 0),this.model.refilter()}},{key:"setSelection",value:function(e,t){var n=this,r=e.map((function(e){return n.model.getNode(e)}));this.selection.set(r,t);var i=e.map((function(e){return n.model.getListIndex(e)})).filter((function(e){return e>-1}));this.view.setSelection(i,t,!0)}},{key:"getSelection",value:function(){return this.selection.get()}},{key:"setFocus",value:function(e,t){var n=this,r=e.map((function(e){return n.model.getNode(e)}));this.focus.set(r,t);var i=e.map((function(e){return n.model.getListIndex(e)})).filter((function(e){return e>-1}));this.view.setFocus(i,t,!0)}},{key:"focusNext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.focusNavigationFilter;this.view.focusNext(e,t,n,r)}},{key:"getFocus",value:function(){return this.focus.get()}},{key:"reveal",value:function(e,t){this.model.expandTo(e);var n=this.model.getListIndex(e);-1!==n&&this.view.reveal(n,t)}},{key:"getRelativeTop",value:function(e){var t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}},{key:"onLeftArrow",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!0)){var i=this.model.getParentNodeLocation(r);if(!i)return;var o=this.model.getListIndex(i);this.view.reveal(o),this.view.setFocus([o])}}}},{key:"onRightArrow",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],r=this.model.getNodeLocation(n);if(!this.model.setCollapsed(r,!1)){if(!n.children.some((function(e){return e.visible})))return;var o=this.view.getFocus(),a=Object(i.a)(o,1)[0]+1;this.view.reveal(a),this.view.setFocus([a])}}}},{key:"onSpace",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.view.getFocusedElements();if(0!==t.length){var n=t[0],r=this.model.getNodeLocation(n),i=e.browserEvent.altKey;this.model.setCollapsed(r,void 0,i)}}},{key:"dispose",value:function(){Object(f.f)(this.disposables),this.view.dispose()}},{key:"onDidChangeFocus",get:function(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}},{key:"onDidChangeSelection",get:function(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}},{key:"onMouseDblClick",get:function(){return m.b.map(this.view.onMouseDblClick,_e)}},{key:"onPointer",get:function(){return m.b.map(this.view.onPointer,_e)}},{key:"onDidFocus",get:function(){return this.view.onDidFocus}},{key:"onDidChangeCollapseState",get:function(){return this.model.onDidChangeCollapseState}},{key:"expandOnlyOnDoubleClick",get:function(){var e;return null!==(e=this._options.expandOnlyOnDoubleClick)&&void 0!==e&&e}},{key:"expandOnlyOnTwistieClick",get:function(){return"undefined"!==typeof this._options.expandOnlyOnTwistieClick&&this._options.expandOnlyOnTwistieClick}},{key:"onDidDispose",get:function(){return this.view.onDidDispose}},{key:"options",get:function(){return this._options}},{key:"scrollTop",get:function(){return this.view.scrollTop},set:function(e){this.view.scrollTop=e}}]),e}(),Ee=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(u.a)(this,e),this.user=t,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Z(t,n,null,r),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,r.sorter&&(this.sorter={compare:function(e,t){return r.sorter.compare(e.element,t.element)}}),this.identityProvider=r.identityProvider}return Object(d.a)(e,[{key:"setChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.getElementLocation(e);this._setChildren(i,this.preserveCollapseState(t),n,r)}},{key:"_setChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty(),r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=new Set,a=new Set,s=function(e){if(null!==e.element){var n=e;if(o.add(n.element),t.nodes.set(n.element,n),t.identityProvider){var i=t.identityProvider.getId(n.element).toString();a.add(i),t.nodesByIdentity.set(i,n)}r&&r(n)}},l=function(e){if(null!==e.element){var n=e;if(o.has(n.element)||t.nodes.delete(n.element),t.identityProvider){var r=t.identityProvider.getId(n.element).toString();a.has(r)||t.nodesByIdentity.delete(r)}i&&i(n)}};this.model.splice([].concat(Object(R.a)(e),[0]),Number.MAX_VALUE,n,s,l)}},{key:"preserveCollapseState",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A.a.empty();return this.sorter&&(t=Object(p.p)(Object(R.a)(t),this.sorter.compare.bind(this.sorter))),A.a.map(t,(function(t){var n=e.nodes.get(t.element);if(!n&&e.identityProvider){var r=e.identityProvider.getId(t.element).toString();n=e.nodesByIdentity.get(r)}if(!n)return Object.assign(Object.assign({},t),{children:e.preserveCollapseState(t.children)});var i="boolean"===typeof t.collapsible?t.collapsible:n.collapsible,o="undefined"!==typeof t.collapsed?t.collapsed:n.collapsed;return Object.assign(Object.assign({},t),{collapsible:i,collapsed:o,children:e.preserveCollapseState(t.children)})}))}},{key:"rerender",value:function(e){var t=this.getElementLocation(e);this.model.rerender(t)}},{key:"has",value:function(e){return this.nodes.has(e)}},{key:"getListIndex",value:function(e){var t=this.getElementLocation(e);return this.model.getListIndex(t)}},{key:"getListRenderCount",value:function(e){var t=this.getElementLocation(e);return this.model.getListRenderCount(t)}},{key:"isCollapsible",value:function(e){var t=this.getElementLocation(e);return this.model.isCollapsible(t)}},{key:"setCollapsible",value:function(e,t){var n=this.getElementLocation(e);return this.model.setCollapsible(n,t)}},{key:"isCollapsed",value:function(e){var t=this.getElementLocation(e);return this.model.isCollapsed(t)}},{key:"setCollapsed",value:function(e,t,n){var r=this.getElementLocation(e);return this.model.setCollapsed(r,t,n)}},{key:"expandTo",value:function(e){var t=this.getElementLocation(e);this.model.expandTo(t)}},{key:"refilter",value:function(){this.model.refilter()}},{key:"getNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e)return this.model.getNode(this.model.rootRef);var t=this.nodes.get(e);if(!t)throw new j(this.user,"Tree element not found: ".concat(e));return t}},{key:"getNodeLocation",value:function(e){return e.element}},{key:"getParentNodeLocation",value:function(e){if(null===e)throw new j(this.user,"Invalid getParentNodeLocation call");var t=this.nodes.get(e);if(!t)throw new j(this.user,"Tree element not found: ".concat(e));var n=this.model.getNodeLocation(t),r=this.model.getParentNodeLocation(n);return this.model.getNode(r).element}},{key:"getElementLocation",value:function(e){if(null===e)return[];var t=this.nodes.get(e);if(!t)throw new j(this.user,"Tree element not found: ".concat(e));return this.model.getNodeLocation(t)}}]),e}();function we(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:A.a.map(A.a.from(e.children),we),collapsible:e.collapsible,collapsed:e.collapsed}}function Oe(e){for(var t,n,r=[e.element],o=e.incompressible||!1;;){var a=A.a.consume(A.a.from(e.children),2),s=Object(i.a)(a,2);if(n=s[0],t=s[1],1!==n.length)break;if((e=n[0]).incompressible)break;r.push(e.element)}return{element:{elements:r,incompressible:o},children:A.a.map(A.a.concat(n,t),Oe),collapsible:e.collapsible,collapsed:e.collapsed}}function Te(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=n2&&void 0!==arguments[2]?arguments[2]:{};Object(u.a)(this,e),this.user=t,this.rootRef=null,this.nodes=new Map,this.model=new Ee(t,n,r),this.enabled="undefined"===typeof r.compressionEnabled||r.compressionEnabled}return Object(d.a)(e,[{key:"setChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty();if(null!==e){var n=this.nodes.get(e);if(!n)throw new Error("Unknown compressed tree node");var r=this.model.getNode(n),i=this.model.getParentNodeLocation(n),o=this.model.getNode(i),a=xe(r),s=Ne(a,e,t),l=(this.enabled?Oe:we)(s),c=o.children.map((function(e){return e===r?l:e}));this._setChildren(o.element,c)}else{var u=A.a.map(t,this.enabled?Oe:we);this._setChildren(null,u)}}},{key:"setCompressionEnabled",value:function(e){if(e!==this.enabled){this.enabled=e;var t=this.model.getNode().children,n=A.a.map(t,xe),r=A.a.map(n,e?Oe:we);this._setChildren(null,r)}}},{key:"_setChildren",value:function(e,t){var n=this,r=new Set;this.model.setChildren(e,t,(function(e){var t,i=Object(I.a)(e.element.elements);try{for(i.s();!(t=i.n()).done;){var o=t.value;r.add(o),n.nodes.set(o,e.element)}}catch(a){i.e(a)}finally{i.f()}}),(function(e){var t,i=Object(I.a)(e.element.elements);try{for(i.s();!(t=i.n()).done;){var o=t.value;r.has(o)||n.nodes.delete(o)}}catch(a){i.e(a)}finally{i.f()}}))}},{key:"has",value:function(e){return this.nodes.has(e)}},{key:"getListIndex",value:function(e){var t=this.getCompressedNode(e);return this.model.getListIndex(t)}},{key:"getListRenderCount",value:function(e){var t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}},{key:"getNode",value:function(e){if("undefined"===typeof e)return this.model.getNode();var t=this.getCompressedNode(e);return this.model.getNode(t)}},{key:"getNodeLocation",value:function(e){var t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}},{key:"getParentNodeLocation",value:function(e){var t=this.getCompressedNode(e),n=this.model.getParentNodeLocation(t);return null===n?null:n.elements[n.elements.length-1]}},{key:"isCollapsible",value:function(e){var t=this.getCompressedNode(e);return this.model.isCollapsible(t)}},{key:"setCollapsible",value:function(e,t){var n=this.getCompressedNode(e);return this.model.setCollapsible(n,t)}},{key:"isCollapsed",value:function(e){var t=this.getCompressedNode(e);return this.model.isCollapsed(t)}},{key:"setCollapsed",value:function(e,t,n){var r=this.getCompressedNode(e);return this.model.setCollapsed(r,t,n)}},{key:"expandTo",value:function(e){var t=this.getCompressedNode(e);this.model.expandTo(t)}},{key:"rerender",value:function(e){var t=this.getCompressedNode(e);this.model.rerender(t)}},{key:"refilter",value:function(){this.model.refilter()}},{key:"getCompressedNode",value:function(e){if(null===e)return null;var t=this.nodes.get(e);if(!t)throw new j(this.user,"Tree element not found: ".concat(e));return t}},{key:"onDidSplice",get:function(){return this.model.onDidSplice}},{key:"onDidChangeCollapseState",get:function(){return this.model.onDidChangeCollapseState}},{key:"onDidChangeRenderNodeCount",get:function(){return this.model.onDidChangeRenderNodeCount}}]),e}(),Le=function(e){return e[e.length-1]},Ae=function(){function e(t,n){Object(u.a)(this,e),this.unwrapper=t,this.node=n}return Object(d.a)(e,[{key:"element",get:function(){return null===this.node.element?null:this.unwrapper(this.node.element)}},{key:"children",get:function(){var t=this;return this.node.children.map((function(n){return new e(t.unwrapper,n)}))}},{key:"depth",get:function(){return this.node.depth}},{key:"visibleChildrenCount",get:function(){return this.node.visibleChildrenCount}},{key:"visibleChildIndex",get:function(){return this.node.visibleChildIndex}},{key:"collapsible",get:function(){return this.node.collapsible}},{key:"collapsed",get:function(){return this.node.collapsed}},{key:"visible",get:function(){return this.node.visible}},{key:"filterData",get:function(){return this.node.filterData}}]),e}();function Ie(e,t){return{splice:function(n,r,i){t.splice(n,r,i.map((function(t){return e.map(t)})))},updateElementHeight:function(e,n){t.updateElementHeight(e,n)}}}function Re(e,t){return Object.assign(Object.assign({},t),{sorter:t.sorter&&{compare:function(e,n){return t.sorter.compare(e.elements[0],n.elements[0])}},identityProvider:t.identityProvider&&{getId:function(n){return t.identityProvider.getId(e(n))}},filter:t.filter&&{filter:function(n,r){return t.filter.filter(e(n),r)}}})}var Me=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(u.a)(this,e),this.rootRef=null,this.elementMapper=i.elementMapper||Le;var o=function(e){return r.elementMapper(e.elements)};this.nodeMapper=new F((function(e){return new Ae(o,e)})),this.model=new De(t,Ie(this.nodeMapper,n),Re(o,i))}return Object(d.a)(e,[{key:"setChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty();this.model.setChildren(e,t)}},{key:"setCompressionEnabled",value:function(e){this.model.setCompressionEnabled(e)}},{key:"has",value:function(e){return this.model.has(e)}},{key:"getListIndex",value:function(e){return this.model.getListIndex(e)}},{key:"getListRenderCount",value:function(e){return this.model.getListRenderCount(e)}},{key:"getNode",value:function(e){return this.nodeMapper.map(this.model.getNode(e))}},{key:"getNodeLocation",value:function(e){return e.element}},{key:"getParentNodeLocation",value:function(e){return this.model.getParentNodeLocation(e)}},{key:"isCollapsible",value:function(e){return this.model.isCollapsible(e)}},{key:"setCollapsible",value:function(e,t){return this.model.setCollapsible(e,t)}},{key:"isCollapsed",value:function(e){return this.model.isCollapsed(e)}},{key:"setCollapsed",value:function(e,t,n){return this.model.setCollapsed(e,t,n)}},{key:"expandTo",value:function(e){return this.model.expandTo(e)}},{key:"rerender",value:function(e){return this.model.rerender(e)}},{key:"refilter",value:function(){return this.model.refilter()}},{key:"getCompressedTreeNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.model.getNode(e)}},{key:"onDidSplice",get:function(){var e=this;return m.b.map(this.model.onDidSplice,(function(t){var n=t.insertedNodes,r=t.deletedNodes;return{insertedNodes:n.map((function(t){return e.nodeMapper.map(t)})),deletedNodes:r.map((function(t){return e.nodeMapper.map(t)}))}}))}},{key:"onDidChangeCollapseState",get:function(){var e=this;return m.b.map(this.model.onDidChangeCollapseState,(function(t){var n=t.node,r=t.deep;return{node:e.nodeMapper.map(n),deep:r}}))}},{key:"onDidChangeRenderNodeCount",get:function(){var e=this;return m.b.map(this.model.onDidChangeRenderNodeCount,(function(t){return e.nodeMapper.map(t)}))}}]),e}(),Pe=n(104),je=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Fe=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(u.a)(this,n),t.call(this,e,r,i,o,a)}return Object(d.a)(n,[{key:"setChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty();this.model.setChildren(e,t)}},{key:"rerender",value:function(e){void 0!==e?this.model.rerender(e):this.view.rerender()}},{key:"hasElement",value:function(e){return this.model.has(e)}},{key:"createModel",value:function(e,t,n){return new Ee(e,t,n)}},{key:"onDidChangeCollapseState",get:function(){return this.model.onDidChangeCollapseState}}]),n}(ke),Be=function(){function e(t,n){Object(u.a)(this,e),this._compressedTreeNodeProvider=t,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}return Object(d.a)(e,[{key:"renderTemplate",value:function(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}},{key:"renderElement",value:function(e,t,n,r){var i=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===i.element.elements.length?(n.compressedTreeNode=void 0,this.renderer.renderElement(e,t,n.data,r)):(n.compressedTreeNode=i,this.renderer.renderCompressedElements(i,t,n.data,r))}},{key:"disposeElement",value:function(e,t,n,r){n.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(n.compressedTreeNode,t,n.data,r):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,n.data,r)}},{key:"disposeTemplate",value:function(e){this.renderer.disposeTemplate(e.data)}},{key:"renderTwistie",value:function(e,t){this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}},{key:"compressedTreeNodeProvider",get:function(){return this._compressedTreeNodeProvider()}}]),e}();function Ue(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel:function(n){var r;try{r=e().getCompressedTreeNode(n)}catch(i){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return 1===r.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(r.element.elements)}}})}je([Pe.a],Be.prototype,"compressedTreeNodeProvider",null);var He=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a){var s,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Object(u.a)(this,n);var c=function(){return Object(o.a)(s)},d=a.map((function(e){return new Be(c,e)}));return s=t.call(this,e,r,i,d,Ue(c,l))}return Object(d.a)(n,[{key:"setChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.a.empty();this.model.setChildren(e,t)}},{key:"createModel",value:function(e,t,n){return new Me(e,t,n)}},{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(Object(s.a)(n.prototype),"updateOptions",this).call(this,e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}},{key:"getCompressedTreeNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.model.getCompressedTreeNode(e)}}]),n}(Fe),ze=n(14),Ve=n.n(ze),We=n(25),Ge=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function qe(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Ke(e,t){return!!t.parent&&(t.parent===e||Ke(e,t.parent))}function Ye(e,t){return e===t||Ke(e,t)||Ke(t,e)}var $e=function(){function e(t){Object(u.a)(this,e),this.node=t}return Object(d.a)(e,[{key:"element",get:function(){return this.node.element.element}},{key:"children",get:function(){return this.node.children.map((function(t){return new e(t)}))}},{key:"depth",get:function(){return this.node.depth}},{key:"visibleChildrenCount",get:function(){return this.node.visibleChildrenCount}},{key:"visibleChildIndex",get:function(){return this.node.visibleChildIndex}},{key:"collapsible",get:function(){return this.node.collapsible}},{key:"collapsed",get:function(){return this.node.collapsed}},{key:"visible",get:function(){return this.node.visible}},{key:"filterData",get:function(){return this.node.filterData}}]),e}(),Qe=function(){function e(t,n,r){Object(u.a)(this,e),this.renderer=t,this.nodeMapper=n,this.onDidChangeTwistieState=r,this.renderedNodes=new Map,this.templateId=t.templateId}return Object(d.a)(e,[{key:"renderTemplate",value:function(e){return{templateData:this.renderer.renderTemplate(e)}}},{key:"renderElement",value:function(e,t,n,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}},{key:"renderTwistie",value:function(e,t){return e.slow?Object(h.addClasses)(t,se.classNames):Object(h.removeClasses)(t,se.classNames),!1}},{key:"disposeElement",value:function(e,t,n,r){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,r)}},{key:"disposeTemplate",value:function(e){this.renderer.disposeTemplate(e.templateData)}},{key:"dispose",value:function(){this.renderedNodes.clear()}}]),e}();function Ze(e){return{browserEvent:e.browserEvent,elements:e.elements.map((function(e){return e.element}))}}function Xe(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}var Je=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e.elements.map((function(e){return e.element})))).data=e,r}return n}(U.a);function et(e){return e instanceof U.a?new Je(e):e}var tt=function(){function e(t){Object(u.a)(this,e),this.dnd=t}return Object(d.a)(e,[{key:"getDragURI",value:function(e){return this.dnd.getDragURI(e.element)}},{key:"getDragLabel",value:function(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((function(e){return e.element})),t)}},{key:"onDragStart",value:function(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(et(e),t)}},{key:"onDragOver",value:function(e,t,n,r){return this.dnd.onDragOver(et(e),t&&t.element,n,r)}},{key:"drop",value:function(e,t,n,r){this.dnd.drop(et(e),t&&t.element,n,r)}},{key:"onDragEnd",value:function(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}]),e}();function nt(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:function(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new tt(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:function(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent:function(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?function(t){return e.accessibilityProvider.getRole(t.element)}:function(){return"treeitem"},isChecked:e.accessibilityProvider.isChecked?function(t){var n;return!!(null===(n=e.accessibilityProvider)||void 0===n?void 0:n.isChecked(t.element))}:void 0,getAriaLabel:function(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel:function(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?function(){return e.accessibilityProvider.getWidgetRole()}:function(){return"tree"},getAriaLevel:e.accessibilityProvider.getAriaLevel&&function(t){return e.accessibilityProvider.getAriaLevel(t.element)},getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&function(t){return e.accessibilityProvider.getActiveDescendantId(t.element)}}),filter:e.filter&&{filter:function(t,n){return e.filter.filter(t.element,n)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:function(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:function(t){return e.expandOnlyOnTwistieClick(t.element)},additionalScrollHeight:e.additionalScrollHeight})}function rt(e,t){t(e),e.children.forEach((function(e){return rt(e,t)}))}var it=function(){function e(t,n,r,i,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};Object(u.a)(this,e),this.user=t,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new m.a,this._onDidChangeNodeSlowState=new m.a,this.nodeMapper=new F((function(e){return new $e(e)})),this.disposables=new f.b,this.identityProvider=a.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof a.autoExpandSingleChildren&&a.autoExpandSingleChildren,this.sorter=a.sorter,this.collapseByDefault=a.collapseByDefault,this.tree=this.createTree(t,n,r,i,a),this.root=qe({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)}return Object(d.a)(e,[{key:"createTree",value:function(e,t,n,r,i){var o=this,a=new fe(n),s=r.map((function(e){return new Qe(e,o.nodeMapper,o._onDidChangeNodeSlowState.event)})),l=nt(i)||{};return new Fe(e,t,a,s,l)}},{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tree.updateOptions(e)}},{key:"getHTMLElement",value:function(){return this.tree.getHTMLElement()}},{key:"domFocus",value:function(){this.tree.domFocus()}},{key:"layout",value:function(e,t){this.tree.layout(e,t)}},{key:"style",value:function(e){this.tree.style(e)}},{key:"getInput",value:function(){return this.root.element}},{key:"setInput",value:function(e,t){return Ge(this,void 0,void 0,Ve.a.mark((function n(){var r;return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return this.refreshPromises.forEach((function(e){return e.cancel()})),this.refreshPromises.clear(),this.root.element=e,r=t&&{viewState:t,focus:[],selection:[]},n.next=6,this._updateChildren(e,!0,!1,r);case 6:r&&(this.tree.setFocus(r.focus),this.tree.setSelection(r.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop);case 8:case"end":return n.stop()}}),n,this)})))}},{key:"_updateChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root.element,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return Ge(this,void 0,void 0,Ve.a.mark((function i(){var o;return Ve.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if("undefined"!==typeof this.root.element){i.next=2;break}throw new j(this.user,"Tree input not set");case 2:if(!this.root.refreshPromise){i.next=7;break}return i.next=5,this.root.refreshPromise;case 5:return i.next=7,m.b.toPromise(this._onDidRender.event);case 7:return o=this.getDataNode(e),i.next=10,this.refreshAndRenderNode(o,t,r);case 10:if(n)try{this.tree.rerender(o)}catch(a){}case 11:case"end":return i.stop()}}),i,this)})))}},{key:"rerender",value:function(e){if(void 0!==e&&e!==this.root.element){var t=this.getDataNode(e);this.tree.rerender(t)}else this.tree.rerender()}},{key:"collapse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getDataNode(e);return this.tree.collapse(n===this.root?null:n,t)}},{key:"expand",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ge(this,void 0,void 0,Ve.a.mark((function n(){var r,i;return Ve.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("undefined"!==typeof this.root.element){n.next=2;break}throw new j(this.user,"Tree input not set");case 2:if(!this.root.refreshPromise){n.next=7;break}return n.next=5,this.root.refreshPromise;case 5:return n.next=7,m.b.toPromise(this._onDidRender.event);case 7:if(r=this.getDataNode(e),!this.tree.hasElement(r)||this.tree.isCollapsible(r)){n.next=10;break}return n.abrupt("return",!1);case 10:if(!r.refreshPromise){n.next=15;break}return n.next=13,this.root.refreshPromise;case 13:return n.next=15,m.b.toPromise(this._onDidRender.event);case 15:if(r===this.root||r.refreshPromise||this.tree.isCollapsed(r)){n.next=17;break}return n.abrupt("return",!1);case 17:if(i=this.tree.expand(r===this.root?null:r,t),!r.refreshPromise){n.next=23;break}return n.next=21,this.root.refreshPromise;case 21:return n.next=23,m.b.toPromise(this._onDidRender.event);case 23:return n.abrupt("return",i);case 24:case"end":return n.stop()}}),n,this)})))}},{key:"setSelection",value:function(e,t){var n=this,r=e.map((function(e){return n.getDataNode(e)}));this.tree.setSelection(r,t)}},{key:"getSelection",value:function(){return this.tree.getSelection().map((function(e){return e.element}))}},{key:"setFocus",value:function(e,t){var n=this,r=e.map((function(e){return n.getDataNode(e)}));this.tree.setFocus(r,t)}},{key:"getFocus",value:function(){return this.tree.getFocus().map((function(e){return e.element}))}},{key:"reveal",value:function(e,t){this.tree.reveal(this.getDataNode(e),t)}},{key:"getDataNode",value:function(e){var t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new j(this.user,"Data tree node not found: ".concat(e));return t}},{key:"refreshAndRenderNode",value:function(e,t,n){return Ge(this,void 0,void 0,Ve.a.mark((function r(){return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.refreshNode(e,t,n);case 2:this.render(e,n);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"refreshNode",value:function(e,t,n){return Ge(this,void 0,void 0,Ve.a.mark((function r(){var i,o=this;return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.subTreeRefreshPromises.forEach((function(r,a){!i&&Ye(a,e)&&(i=r.then((function(){return o.refreshNode(e,t,n)})))})),!i){r.next=3;break}return r.abrupt("return",i);case 3:return r.abrupt("return",this.doRefreshSubTree(e,t,n));case 4:case"end":return r.stop()}}),r,this)})))}},{key:"doRefreshSubTree",value:function(e,t,n){return Ge(this,void 0,void 0,Ve.a.mark((function r(){var i,o,a=this;return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.refreshPromise=new Promise((function(e){return i=e})),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((function(){e.refreshPromise=void 0,a.subTreeRefreshPromises.delete(e)})),r.prev=3,r.next=6,this.doRefreshNode(e,t,n);case 6:return o=r.sent,e.stale=!1,r.next=10,Promise.all(o.map((function(e){return a.doRefreshSubTree(e,t,n)})));case 10:return r.prev=10,i(),r.finish(10);case 13:case"end":return r.stop()}}),r,this,[[3,,10,13]])})))}},{key:"doRefreshNode",value:function(e,t,n){return Ge(this,void 0,void 0,Ve.a.mark((function r(){var i,o,a,s=this;return Ve.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren?((o=Object(X.l)(800)).then((function(){e.slow=!0,s._onDidChangeNodeSlowState.fire(e)}),(function(e){return null})),i=this.doGetChildren(e).finally((function(){return o.cancel()}))):i=Promise.resolve(A.a.empty()),r.prev=2,r.next=5,i;case 5:return a=r.sent,r.abrupt("return",this.setChildren(e,a,t,n));case 9:if(r.prev=9,r.t0=r.catch(2),e!==this.root&&this.tree.collapse(e===this.root?null:e),!Object(We.d)(r.t0)){r.next=14;break}return r.abrupt("return",[]);case 14:throw r.t0;case 15:return r.prev=15,e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e)),r.finish(15);case 18:case"end":return r.stop()}}),r,this,[[2,9,15,18]])})))}},{key:"doGetChildren",value:function(e){var t=this,n=this.refreshPromises.get(e);return n||(n=Object(X.f)((function(){return Ge(t,void 0,void 0,Ve.a.mark((function t(){var n;return Ve.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.dataSource.getChildren(e.element);case 2:return n=t.sent,t.abrupt("return",this.processChildren(n));case 4:case"end":return t.stop()}}),t,this)})))})),this.refreshPromises.set(e,n),n.finally((function(){t.refreshPromises.delete(e)})))}},{key:"_onDidChangeCollapseState",value:function(e){var t=e.node,n=e.deep;null!==t.element&&!t.collapsed&&t.element.stale&&(n?this.collapse(t.element.element):this.refreshAndRenderNode(t.element,!1).catch(We.e))}},{key:"setChildren",value:function(e,t,n,r){var i,o=this,a=Object(R.a)(t);if(0===e.children.length&&0===a.length)return[];var s,l=new Map,c=new Map,u=Object(I.a)(e.children);try{for(u.s();!(s=u.n()).done;){var d=s.value;if(l.set(d.element,d),this.identityProvider){var h=this.tree.isCollapsed(d);c.set(d.id,{node:d,collapsed:h})}}}catch(y){u.e(y)}finally{u.f()}var f,p=[],g=a.map((function(t){var i=!!o.dataSource.hasChildren(t);if(!o.identityProvider){var a=qe({element:t,parent:e,hasChildren:i});return i&&o.collapseByDefault&&!o.collapseByDefault(t)&&(a.collapsedByDefault=!1,p.push(a)),a}var s=o.identityProvider.getId(t).toString(),u=c.get(s);if(u){var d=u.node;return l.delete(d.element),o.nodes.delete(d.element),o.nodes.set(t,d),d.element=t,d.hasChildren=i,n?u.collapsed?(d.children.forEach((function(e){return rt(e,(function(e){return o.nodes.delete(e.element)}))})),d.children.splice(0,d.children.length),d.stale=!0):p.push(d):i&&o.collapseByDefault&&!o.collapseByDefault(t)&&(d.collapsedByDefault=!1,p.push(d)),d}var h=qe({element:t,parent:e,id:s,hasChildren:i});return r&&r.viewState.focus&&r.viewState.focus.indexOf(s)>-1&&r.focus.push(h),r&&r.viewState.selection&&r.viewState.selection.indexOf(s)>-1&&r.selection.push(h),r&&r.viewState.expanded&&r.viewState.expanded.indexOf(s)>-1?p.push(h):i&&o.collapseByDefault&&!o.collapseByDefault(t)&&(h.collapsedByDefault=!1,p.push(h)),h})),m=Object(I.a)(l.values());try{for(m.s();!(f=m.n()).done;){rt(f.value,(function(e){return o.nodes.delete(e.element)}))}}catch(y){m.e(y)}finally{m.f()}var v,_=Object(I.a)(g);try{for(_.s();!(v=_.n()).done;){var b=v.value;this.nodes.set(b.element,b)}}catch(y){_.e(y)}finally{_.f()}return(i=e.children).splice.apply(i,[0,e.children.length].concat(Object(R.a)(g))),e!==this.root&&this.autoExpandSingleChildren&&1===g.length&&0===p.length&&(g[0].collapsedByDefault=!1,p.push(g[0])),p}},{key:"render",value:function(e,t){var n=this,r=e.children.map((function(e){return n.asTreeElement(e,t)}));this.tree.setChildren(e===this.root?null:e,r),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}},{key:"asTreeElement",value:function(e,t){var n,r=this;return e.stale?{element:e,collapsible:e.hasChildren,collapsed:!0}:(n=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?A.a.map(e.children,(function(e){return r.asTreeElement(e,t)})):[],collapsible:e.hasChildren,collapsed:n})}},{key:"processChildren",value:function(e){return this.sorter&&(e=Object(R.a)(e).sort(this.sorter.compare.bind(this.sorter))),e}},{key:"dispose",value:function(){this.disposables.dispose()}},{key:"onDidChangeFocus",get:function(){return m.b.map(this.tree.onDidChangeFocus,Ze)}},{key:"onDidChangeSelection",get:function(){return m.b.map(this.tree.onDidChangeSelection,Ze)}},{key:"onMouseDblClick",get:function(){return m.b.map(this.tree.onMouseDblClick,Xe)}},{key:"onPointer",get:function(){return m.b.map(this.tree.onPointer,Xe)}},{key:"onDidFocus",get:function(){return this.tree.onDidFocus}},{key:"onDidDispose",get:function(){return this.tree.onDidDispose}},{key:"scrollTop",get:function(){return this.tree.scrollTop},set:function(e){this.tree.scrollTop=e}}]),e}(),ot=function(){function e(t){Object(u.a)(this,e),this.node=t}return Object(d.a)(e,[{key:"element",get:function(){return{elements:this.node.element.elements.map((function(e){return e.element})),incompressible:this.node.element.incompressible}}},{key:"children",get:function(){return this.node.children.map((function(t){return new e(t)}))}},{key:"depth",get:function(){return this.node.depth}},{key:"visibleChildrenCount",get:function(){return this.node.visibleChildrenCount}},{key:"visibleChildIndex",get:function(){return this.node.visibleChildIndex}},{key:"collapsible",get:function(){return this.node.collapsible}},{key:"collapsed",get:function(){return this.node.collapsed}},{key:"visible",get:function(){return this.node.visible}},{key:"filterData",get:function(){return this.node.filterData}}]),e}(),at=function(){function e(t,n,r,i){Object(u.a)(this,e),this.renderer=t,this.nodeMapper=n,this.compressibleNodeMapperProvider=r,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.disposables=[],this.templateId=t.templateId}return Object(d.a)(e,[{key:"renderTemplate",value:function(e){return{templateData:this.renderer.renderTemplate(e)}}},{key:"renderElement",value:function(e,t,n,r){this.renderer.renderElement(this.nodeMapper.map(e),t,n.templateData,r)}},{key:"renderCompressedElements",value:function(e,t,n,r){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}},{key:"renderTwistie",value:function(e,t){return e.slow?Object(h.addClasses)(t,se.classNames):Object(h.removeClasses)(t,se.classNames),!1}},{key:"disposeElement",value:function(e,t,n,r){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,n.templateData,r)}},{key:"disposeCompressedElements",value:function(e,t,n,r){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,n.templateData,r)}},{key:"disposeTemplate",value:function(e){this.renderer.disposeTemplate(e.templateData)}},{key:"dispose",value:function(){this.renderedNodes.clear(),this.disposables=Object(f.f)(this.disposables)}}]),e}();var st=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,o,a,s){var l,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};return Object(u.a)(this,n),(l=t.call(this,e,r,i,a,s,c)).compressionDelegate=o,l.compressibleNodeMapper=new F((function(e){return new ot(e)})),l.filter=c.filter,l}return Object(d.a)(n,[{key:"createTree",value:function(e,t,n,r,i){var o=this,a=new fe(n),s=r.map((function(e){return new at(e,o.nodeMapper,(function(){return o.compressibleNodeMapper}),o._onDidChangeNodeSlowState.event)})),l=function(e){var t=e&&nt(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:function(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((function(e){return e.element})))}})})}(i)||{};return new He(e,t,a,s,l)}},{key:"asTreeElement",value:function(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},Object(a.a)(Object(s.a)(n.prototype),"asTreeElement",this).call(this,e,t))}},{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tree.updateOptions(e)}},{key:"render",value:function(e,t){var r=this;if(!this.identityProvider)return Object(a.a)(Object(s.a)(n.prototype),"render",this).call(this,e,t);var i=function(e){return r.identityProvider.getId(e).toString()},o=function(e){var t,n=new Set,o=Object(I.a)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=r.tree.getCompressedTreeNode(a===r.root?null:a);if(s.element){var l,c=Object(I.a)(s.element.elements);try{for(c.s();!(l=c.n()).done;){var u=l.value;n.add(i(u.element))}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){o.e(d)}finally{o.f()}return n},l=o(this.tree.getSelection()),c=o(this.tree.getFocus());Object(a.a)(Object(s.a)(n.prototype),"render",this).call(this,e,t);var u=this.getSelection(),d=!1,h=this.getFocus(),f=!1;!function e(t){var n=t.element;if(n)for(var r=0;r5&&void 0!==arguments[5]?arguments[5]:{};return Object(u.a)(this,n),(s=t.call(this,e,r,i,o,l)).user=e,s.dataSource=a,s.identityProvider=l.identityProvider,s}return Object(d.a)(n,[{key:"createModel",value:function(e,t,n){return new Ee(e,t,n)}}]),n}(ke),ut=n(86),dt=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ht=function(e,t){return function(n,r){t(n,r,e)}},ft=Object(T.c)("listService"),pt=function(){function e(t){Object(u.a)(this,e),this._themeService=t,this.disposables=new f.b,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}return Object(d.a)(e,[{key:"register",value:function(e,t){var n=this;if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;var r=new g.b(Object(h.createStyleSheet)(),"");this.disposables.add(Object(D.b)(r,this._themeService))}if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),Object(f.e)(e.onDidFocus((function(){return n._lastFocusedWidget=e})),Object(f.h)((function(){return n.lists.splice(n.lists.indexOf(i),1)})),e.onDidDispose((function(){n.lists=n.lists.filter((function(e){return e!==i})),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)})))}},{key:"dispose",value:function(){this.disposables.dispose()}},{key:"lastFocusedList",get:function(){return this._lastFocusedWidget}}]),e}();pt=dt([ht(0,L.c)],pt);var gt=new O.c("listFocus",!0),mt=new O.c("listSupportsMultiselect",!0),vt=O.a.and(gt,O.a.not("inputFocus")),_t=new O.c("listHasSelectionOrFocus",!1),bt=new O.c("listDoubleSelection",!1),yt=new O.c("listMultiSelection",!1),St=new O.c("listSupportsKeyboardNavigation",!0),Ct="listAutomaticKeyboardNavigation",kt=new O.c(Ct,!0),Et=!1;function wt(e,t){var n=e.createScoped(t.getHTMLElement());return gt.bindTo(n),n}var Ot="workbench.list.multiSelectModifier",Tt="workbench.list.openMode",xt="workbench.list.horizontalScrolling",Nt="workbench.list.keyboardNavigation",Dt="workbench.list.automaticKeyboardNavigation",Lt="workbench.tree.indent",At="workbench.tree.renderIndentGuides",It="workbench.list.smoothScrolling";function Rt(e){return"alt"===e.getValue(Ot)}var Mt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this)).configurationService=e,r.useAltAsMultipleSelectionModifier=Rt(e),r.registerListeners(),r}return Object(d.a)(n,[{key:"registerListeners",value:function(){var e=this;this._register(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(Ot)&&(e.useAltAsMultipleSelectionModifier=Rt(e.configurationService))})))}},{key:"isSelectionSingleChangeEvent",value:function(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Object(g.h)(e)}},{key:"isSelectionRangeChangeEvent",value:function(e){return Object(g.g)(e)}}]),n}(f.a);function Pt(e,t,n){var r=new f.b,i=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){var o=new Mt(t);i.multipleSelectionController=o,r.add(o)}return i.keyboardNavigationDelegate={mightProducePrintableCharacter:function(e){return n.mightProducePrintableCharacter(e)}},i.smoothScrolling=t.getValue(It),[i,r]}var jt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,a,s,l,c,d,h,f,p){var g;Object(u.a)(this,n);var m="undefined"!==typeof l.horizontalScrolling?l.horizontalScrolling:f.getValue(xt),v=Pt(l,f,p),_=Object(i.a)(v,2),b=_[0],y=_[1];return(g=t.call(this,e,r,a,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(D.d)(h.getColorTheme(),D.e)),b),{horizontalScrolling:m}))).disposables.add(y),g.contextKeyService=wt(c,Object(o.a)(g)),g.themeService=h,mt.bindTo(g.contextKeyService).set(!(!1===l.multipleSelectionSupport)),g.listHasSelectionOrFocus=_t.bindTo(g.contextKeyService),g.listDoubleSelection=bt.bindTo(g.contextKeyService),g.listMultiSelection=yt.bindTo(g.contextKeyService),g.horizontalScrolling=l.horizontalScrolling,g._useAltAsMultipleSelectionModifier=Rt(f),g.disposables.add(g.contextKeyService),g.disposables.add(d.register(Object(o.a)(g))),l.overrideStyles&&g.updateStyles(l.overrideStyles),g.disposables.add(g.onDidChangeSelection((function(){var e=g.getSelection(),t=g.getFocus();g.contextKeyService.bufferChangeEvents((function(){g.listHasSelectionOrFocus.set(e.length>0||t.length>0),g.listMultiSelection.set(e.length>1),g.listDoubleSelection.set(2===e.length)}))}))),g.disposables.add(g.onDidChangeFocus((function(){var e=g.getSelection(),t=g.getFocus();g.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),g.disposables.add(f.onDidChangeConfiguration((function(e){e.affectsConfiguration(Ot)&&(g._useAltAsMultipleSelectionModifier=Rt(f));var t={};if(e.affectsConfiguration(xt)&&void 0===g.horizontalScrolling){var n=f.getValue(xt);t=Object.assign(Object.assign({},t),{horizontalScrolling:n})}if(e.affectsConfiguration(It)){var r=f.getValue(It);t=Object.assign(Object.assign({},t),{smoothScrolling:r})}Object.keys(t).length>0&&g.updateOptions(t)}))),g}return Object(d.a)(n,[{key:"updateOptions",value:function(e){Object(a.a)(Object(s.a)(n.prototype),"updateOptions",this).call(this,e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}},{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._styler&&this._styler.dispose()}},{key:"updateStyles",value:function(e){this._styler&&this._styler.dispose(),this._styler=Object(D.b)(this,this.themeService,e)}}]),n}(g.c);jt=dt([ht(5,O.b),ht(6,ft),ht(7,L.c),ht(8,E.a),ht(9,x.a)],jt);var Ft=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,a,s,l,c,d,h,p,g){var m;Object(u.a)(this,n);var v="undefined"!==typeof l.horizontalScrolling?l.horizontalScrolling:p.getValue(xt),_=Pt(l,p,g),b=Object(i.a)(_,2),y=b[0],S=b[1];return(m=t.call(this,e,r,a,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(D.d)(h.getColorTheme(),D.e)),y),{horizontalScrolling:v}))).disposables=new f.b,m.disposables.add(S),m.contextKeyService=wt(c,Object(o.a)(m)),m.horizontalScrolling=l.horizontalScrolling,mt.bindTo(m.contextKeyService).set(!(!1===l.multipleSelectionSupport)),m._useAltAsMultipleSelectionModifier=Rt(p),m.disposables.add(m.contextKeyService),m.disposables.add(d.register(Object(o.a)(m))),l.overrideStyles&&m.disposables.add(Object(D.b)(Object(o.a)(m),h,l.overrideStyles)),m.disposables.add(p.onDidChangeConfiguration((function(e){e.affectsConfiguration(Ot)&&(m._useAltAsMultipleSelectionModifier=Rt(p));var t={};if(e.affectsConfiguration(xt)&&void 0===m.horizontalScrolling){var n=p.getValue(xt);t=Object.assign(Object.assign({},t),{horizontalScrolling:n})}if(e.affectsConfiguration(It)){var r=p.getValue(It);t=Object.assign(Object.assign({},t),{smoothScrolling:r})}Object.keys(t).length>0&&m.updateOptions(t)}))),m}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this.disposables.dispose()}}]),n}(C);Ft=dt([ht(5,O.b),ht(6,ft),ht(7,L.c),ht(8,E.a),ht(9,x.a)],Ft);var Bt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){return Object(u.a)(this,n),t.call(this,e,r)}return n}(function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i,o,a;return Object(u.a)(this,n),(i=t.call(this)).widget=e,i._onDidOpen=new m.a,i.onDidOpen=i._onDidOpen.event,i.openOnFocus=null!==(o=null===r||void 0===r?void 0:r.openOnFocus)&&void 0!==o&&o,i._register(m.b.filter(i.widget.onDidChangeSelection,(function(e){return e.browserEvent instanceof KeyboardEvent}))((function(e){return i.onSelectionFromKeyboard(e)}))),i._register(i.widget.onPointer((function(e){return i.onPointer(e.browserEvent)}))),i._register(i.widget.onMouseDblClick((function(e){return i.onMouseDblClick(e.browserEvent)}))),i.openOnFocus&&i._register(m.b.filter(i.widget.onDidChangeFocus,(function(e){return e.browserEvent instanceof KeyboardEvent}))((function(e){return i.onFocusFromKeyboard(e)}))),"boolean"!==typeof(null===r||void 0===r?void 0:r.openOnSingleClick)&&(null===r||void 0===r?void 0:r.configurationService)?(i.openOnSingleClick="doubleClick"!==(null===r||void 0===r?void 0:r.configurationService.getValue(Tt)),i._register(null===r||void 0===r?void 0:r.configurationService.onDidChangeConfiguration((function(){i.openOnSingleClick="doubleClick"!==(null===r||void 0===r?void 0:r.configurationService.getValue(Tt))})))):i.openOnSingleClick=null===(a=null===r||void 0===r?void 0:r.openOnSingleClick)||void 0===a||a,i}return Object(d.a)(n,[{key:"onFocusFromKeyboard",value:function(e){var t=this.widget.getFocus();this.widget.setSelection(t,e.browserEvent);var n="boolean"!==typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus;this._open(n,!1,!1,e.browserEvent)}},{key:"onSelectionFromKeyboard",value:function(e){if(1===e.elements.length){var t="boolean"!==typeof e.browserEvent.preserveFocus||e.browserEvent.preserveFocus;this._open(t,!1,!1,e.browserEvent)}}},{key:"onPointer",value:function(e){if(this.openOnSingleClick&&!(2===e.detail)){var t=1===e.button,n=e.ctrlKey||e.metaKey||e.altKey;this._open(!0,t,n,e)}}},{key:"onMouseDblClick",value:function(e){if(e){var t=e.ctrlKey||e.metaKey||e.altKey;this._open(!1,!0,t,e)}}},{key:"_open",value:function(e,t,n,r){this._onDidOpen.fire({editorOptions:{preserveFocus:e,pinned:t,revealIfVisible:!0},sideBySide:n,element:this.widget.getSelection()[0],browserEvent:r})}}]),n}(f.a));function Ut(e,t){var n=!1;return function(r){if(n)return n=!1,!1;var i=t.softDispatch(r,e);return i&&i.enterChord?(n=!0,!1):(n=!1,!0)}}var Ht=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a,s,l,c,d,h,f,p){var g;Object(u.a)(this,n);var m=qt(r,s,l,h,f,p),v=m.options,_=m.getAutomaticKeyboardNavigation,b=m.disposable;return(g=t.call(this,e,r,i,a,v)).disposables.add(b),g.internals=new Kt(Object(o.a)(g),s,_,s.overrideStyles,l,c,d,h,p),g.disposables.add(g.internals),g}return n}(Fe);Ht=dt([ht(5,O.b),ht(6,ft),ht(7,L.c),ht(8,E.a),ht(9,x.a),ht(10,ut.b)],Ht);var zt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a,s,l,c,d,h,f,p){var g;Object(u.a)(this,n);var m=qt(r,s,l,h,f,p),v=m.options,_=m.getAutomaticKeyboardNavigation,b=m.disposable;return(g=t.call(this,e,r,i,a,v)).disposables.add(b),g.internals=new Kt(Object(o.a)(g),s,_,s.overrideStyles,l,c,d,h,p),g.disposables.add(g.internals),g}return Object(d.a)(n,[{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(Object(s.a)(n.prototype),"updateOptions",this).call(this,e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}}]),n}(He);zt=dt([ht(5,O.b),ht(6,ft),ht(7,L.c),ht(8,E.a),ht(9,x.a),ht(10,ut.b)],zt);var Vt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a,s,l,c,d,h,f,p,g){var m;Object(u.a)(this,n);var v=qt(r,l,c,f,p,g),_=v.options,b=v.getAutomaticKeyboardNavigation,y=v.disposable;return(m=t.call(this,e,r,i,a,s,_)).disposables.add(y),m.internals=new Kt(Object(o.a)(m),l,b,l.overrideStyles,c,d,h,f,g),m.disposables.add(m.internals),m}return Object(d.a)(n,[{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(Object(s.a)(n.prototype),"updateOptions",this).call(this,e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}}]),n}(ct);Vt=dt([ht(6,O.b),ht(7,ft),ht(8,L.c),ht(9,E.a),ht(10,x.a),ht(11,ut.b)],Vt);var Wt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a,s,l,c,d,h,f,p,g){var m;Object(u.a)(this,n);var v=qt(r,l,c,f,p,g),_=v.options,b=v.getAutomaticKeyboardNavigation,y=v.disposable;return(m=t.call(this,e,r,i,a,s,_)).disposables.add(y),m.internals=new Kt(Object(o.a)(m),l,b,l.overrideStyles,c,d,h,f,g),m.disposables.add(m.internals),m}return Object(d.a)(n,[{key:"updateOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(Object(s.a)(n.prototype),"updateOptions",this).call(this,e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}},{key:"onDidOpen",get:function(){return this.internals.onDidOpen}}]),n}(it);Wt=dt([ht(6,O.b),ht(7,ft),ht(8,L.c),ht(9,E.a),ht(10,x.a),ht(11,ut.b)],Wt);var Gt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a,s,l,c,d,h,f,p,g,m){var v;Object(u.a)(this,n);var _=qt(r,c,d,p,g,m),b=_.options,y=_.getAutomaticKeyboardNavigation,S=_.disposable;return(v=t.call(this,e,r,i,a,s,l,b)).disposables.add(S),v.internals=new Kt(Object(o.a)(v),c,y,c.overrideStyles,d,h,f,p,m),v.disposables.add(v.internals),v}return n}(st);function qt(e,t,n,r,o,a){St.bindTo(n),Et||(kt.bindTo(n),Et=!0);var s=function(){var e=n.getContextKeyValue(Ct);return e&&(e=r.getValue(Dt)),e},l=a.isScreenReaderOptimized()?"simple":r.getValue(Nt),c=void 0!==t.horizontalScrolling?t.horizontalScrolling:r.getValue(xt),u=Pt(t,r,o),d=Object(i.a)(u,2),h=d[0],f=d[1],p=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:s,disposable:f,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:r.getValue(Lt),renderIndentGuides:r.getValue(At),smoothScrolling:r.getValue(It),automaticKeyboardNavigation:s(),simpleKeyboardNavigation:"simple"===l,filterOnType:"filter"===l,horizontalScrolling:c,keyboardNavigationEventFilter:Ut(e,o),additionalScrollHeight:p,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnDoubleClick:"doubleClick"===r.getValue(Tt)})}}Gt=dt([ht(7,O.b),ht(8,ft),ht(9,L.c),ht(10,E.a),ht(11,x.a),ht(12,ut.b)],Gt);var Kt=function(){function e(t,n,r,i,o,a,s,l,c){var d=this;Object(u.a)(this,e),this.tree=t,this.themeService=s,this.disposables=[],this.contextKeyService=wt(o,t),mt.bindTo(this.contextKeyService).set(!(!1===n.multipleSelectionSupport)),this.hasSelectionOrFocus=_t.bindTo(this.contextKeyService),this.hasDoubleSelection=bt.bindTo(this.contextKeyService),this.hasMultiSelection=yt.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Rt(l);var h=new Set;h.add(Ct);var f=function(){var e=c.isScreenReaderOptimized()?"simple":l.getValue(Nt);t.updateOptions({simpleKeyboardNavigation:"simple"===e,filterOnType:"filter"===e})};this.updateStyleOverrides(i),this.disposables.push(this.contextKeyService,a.register(t),t.onDidChangeSelection((function(){var e=t.getSelection(),n=t.getFocus();d.contextKeyService.bufferChangeEvents((function(){d.hasSelectionOrFocus.set(e.length>0||n.length>0),d.hasMultiSelection.set(e.length>1),d.hasDoubleSelection.set(2===e.length)}))})),t.onDidChangeFocus((function(){var e=t.getSelection(),n=t.getFocus();d.hasSelectionOrFocus.set(e.length>0||n.length>0)})),l.onDidChangeConfiguration((function(e){var i={};if(e.affectsConfiguration(Ot)&&(d._useAltAsMultipleSelectionModifier=Rt(l)),e.affectsConfiguration(Lt)){var o=l.getValue(Lt);i=Object.assign(Object.assign({},i),{indent:o})}if(e.affectsConfiguration(At)){var a=l.getValue(At);i=Object.assign(Object.assign({},i),{renderIndentGuides:a})}if(e.affectsConfiguration(It)){var s=l.getValue(It);i=Object.assign(Object.assign({},i),{smoothScrolling:s})}if(e.affectsConfiguration(Nt)&&f(),e.affectsConfiguration(Dt)&&(i=Object.assign(Object.assign({},i),{automaticKeyboardNavigation:r()})),e.affectsConfiguration(xt)&&void 0===n.horizontalScrolling){var c=l.getValue(xt);i=Object.assign(Object.assign({},i),{horizontalScrolling:c})}e.affectsConfiguration(Tt)&&(i=Object.assign(Object.assign({},i),{expandOnlyOnDoubleClick:"doubleClick"===l.getValue(Tt)})),Object.keys(i).length>0&&t.updateOptions(i)})),this.contextKeyService.onDidChangeContext((function(e){e.affectsSome(h)&&t.updateOptions({automaticKeyboardNavigation:r()})})),c.onDidChangeScreenReaderOptimized((function(){return f()}))),this.navigator=new Bt(t,Object.assign({configurationService:l},n)),this.disposables.push(this.navigator)}return Object(d.a)(e,[{key:"updateStyleOverrides",value:function(e){Object(f.f)(this.styler),this.styler=e?Object(D.b)(this.tree,this.themeService,e):f.a.None}},{key:"dispose",value:function(){this.disposables=Object(f.f)(this.disposables),Object(f.f)(this.styler),this.styler=void 0}},{key:"onDidOpen",get:function(){return this.navigator.onDidOpen}}]),e}();Kt=dt([ht(4,O.b),ht(5,ft),ht(6,L.c),ht(7,E.a),ht(8,ut.b)],Kt),N.a.as(w.a.Configuration).registerConfiguration({id:"workbench",order:7,title:Object(k.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(lt={},Object(r.a)(lt,Ot,{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(k.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(k.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(k.a)({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.")}),Object(r.a)(lt,Tt,{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(k.a)({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. ")}),Object(r.a)(lt,xt,{type:"boolean",default:!1,description:Object(k.a)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")}),Object(r.a)(lt,Lt,{type:"number",default:8,minimum:0,maximum:40,description:Object(k.a)("tree indent setting","Controls tree indentation in pixels.")}),Object(r.a)(lt,At,{type:"string",enum:["none","onHover","always"],default:"onHover",description:Object(k.a)("render tree indent guides","Controls whether the tree should render indent guides.")}),Object(r.a)(lt,It,{type:"boolean",default:!1,description:Object(k.a)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")}),Object(r.a)(lt,Nt,{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[Object(k.a)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),Object(k.a)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),Object(k.a)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:Object(k.a)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")}),Object(r.a)(lt,Dt,{type:"boolean",default:!0,markdownDescription:Object(k.a)("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.")}),lt)})},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r;null!==n&&void 0!==n||"object"===typeof t&&!Array.isArray(t)||(n=t,t={});r=Object.assign({type:String(e)},t),Array.isArray(n)?r.children=n:null!==n&&void 0!==n&&(r.value=String(n));return r}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(439)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46),i=n(21),o={clipboard:{writeText:i.g||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:i.g||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText),richText:function(){if(r.f){var 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:i.g||r.k?0:navigator.keyboard||r.j?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(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("themeService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return l}));var r=n(6),i="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";var o=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n="(-?\\d*\\.\\d\\w*)|([^",o=Object(r.a)(i);try{for(o.s();!(e=o.n()).done;){var a=e.value;t.indexOf(a)>=0||(n+="\\"+a)}}catch(s){o.e(s)}finally{o.f()}return n+="\\s]+)",new RegExp(n,"g")}();function a(e){var t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var s={maxLen:1e3,windowSize:15,timeBudget:150};function l(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s;if(n.length>i.maxLen){var o=e-i.maxLen/2;return o<0?(r+=e,o=0):r+=o,l(e,t,n=n.substring(o,e+i.maxLen/2),r,i)}Date.now();for(var a=e-1-r,u=-1,d=null,h=1;;h++){Date.now(),i.timeBudget;var f=a-i.windowSize*h;t.lastIndex=Math.max(0,f);var p=c(t,n,a,u);if(!p&&d)break;if(d=p,f<=0)break;u=f}if(d){var g={word:d[0],startColumn:r+1+d.index,endColumn:r+1+d.index+d[0].length};return t.lastIndex=0,g}return null}function c(e,t,n,r){for(var i;i=e.exec(t);){var o=i.index||0;if(o<=n&&e.lastIndex>=n)return i;if(r>0&&o>r)return null}return null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));var r,i={ctrlCmd:!1,alt:!1};!function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(21),i="undefined"===typeof e?{cwd:function(){return"/"},env:Object.create(null),get platform(){return r.i?"win32":r.f?"darwin":"linux"},nextTick:function(e){return Object(r.j)(e)}}:e,o=i.cwd,a=i.env,s=i.platform}).call(this,n(200))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37),i=n(31),o=n(248),a=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var i=r.Selection.findFrom(n.doc.resolve(e),t,!0);return i?n.setSelection(i):n}},c=function(e){return e.type&&e.type.spec.selectable},u=function(e,t,n){return function(e){return c(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):l(t)(n)},d=function(e,t,n){return function(r){var i="number"===typeof t,o=r.selection.$from,l=i?r.doc.resolve(t):h(r.selection)?r.doc.resolve(o.pos+1):o,d=l.parent;if(h(r.selection)&&n&&r!==(r=s(e)(r)))return r;if(y(d)&&r!==(r=a(d.type,e)(r))){var f=c(e)?l.before(l.depth):l.pos;return u(e,f,r)}if(b(l,e)){r.insert(l.pos,e);var g=i?l.pos:c(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return p(u(e,g,r))}for(var m=l.depth;m>0;m--){var v=l.after(m),_=r.doc.resolve(v);if(b(_,e))return r.insert(v,e),p(u(e,v,r))}return r}},h=function(e){return e instanceof r.NodeSelection},f=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},p=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},g=function(e,t){return function(n){var r=n.doc.nodeAt(e),i=n.doc.resolve(e);if(m(i,t)){var o=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=l(Math.max(o,0),-1)(n),n=l(n.selection.$from.start())(n),p(n)}return n}},m=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof i.Fragment?t:i.Fragment.from(t))},v=function(e){return function(t){var n=t.doc.nodeAt(e);return p(t.delete(e,e+n.nodeSize))}},_=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t},b=function(e,t){var n=e.index();return t instanceof i.Fragment?e.parent.canReplace(n,n,t):t instanceof i.Node&&e.parent.canReplaceWith(n,n,t.type)},y=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t?e.createChecked(null,t):e.createAndFill()},C=function(e){return function(t){for(var n=o.TableMap.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),i=n.cellsInRect(e),a=n.cellsInRect(n.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r)),s=0,l=i.length;sn[0]?-1:1,o=e.splice(t[0],t.length),a=o.length%2===0?1:0,s=void 0;return s=-1===r&&1===i?n[0]-1:1===r&&-1===i?n[n.length-1]-a+1:-1===i?n[0]:n[n.length-1]-a,e.splice.apply(e,[s,0].concat(o)),e},T=function(e,t,n,r){var i="Target position is invalid, you can't move the "+r+" "+e+" to "+t+", the target can't be split. You could use tryToFit option.";if(1===(e>t?-1:1)){if(-1!==n.slice(0,n.length-1).indexOf(t))throw new Error(i)}else if(-1!==n.slice(1).indexOf(t))throw new Error(i);return!0},x=function(e){return function(t){var n=t.$from;return N(n,e)}},N=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},D=function(e,t){return function(n){var r=x(e)(n);if(r)return R(r.pos,t)}},L=function(e){return function(t){return!!x(e)(t)}},A=function(e){return function(t){return x((function(t){return f(e,t)}))(t)}},I=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var i=A(t.type)(n);return i?i.pos:n.$from.pos}},R=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},M=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},P=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return M(e,n).filter((function(e){return t(e.node)}))},j=function(e,t,n){return P(e,(function(e){return e.type===t}),n)};var F=function(e){return x((function(e){return e.type.spec.tableRole&&"table"===e.type.spec.tableRole}))(e)},B=function(e){return e instanceof o.CellSelection},U=function(e){if(B(e)){var t=o.TableMap.get(e.$anchorCell.node(-1));return C({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},H=function(e){return function(t){var n=F(t);if(n){var r=o.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.width-1){var i=r.cellsInRect({left:t,right:t+1,top:0,bottom:r.height});return e.concat(i.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},z=function(e){return function(t){var n=F(t);if(n){var r=o.TableMap.get(n.node);return(Array.isArray(e)?e:Array.from([e])).reduce((function(e,t){if(t>=0&&t<=r.height-1){var i=r.cellsInRect({left:0,right:r.width,top:t,bottom:t+1});return e.concat(i.map((function(e){var t=n.node.nodeAt(e),r=e+n.start;return{pos:r,start:r+1,node:t}})))}}),[])}}},V=function(e){return function(t,n){return function(r){var i=F(r.selection),a="row"===e;if(i){var s=o.TableMap.get(i.node);if(t>=0&&t<(a?s.height:s.width)){var l=a?0:t,c=a?t:0,u=a?s.width:t+1,d=a?t+1:s.height;if(n){var h=Z(r.selection.$from);if(!h)return r;var f=s.findCell(h.pos-i.start);a?(c=Math.min(c,f.top),d=Math.max(d,f.bottom)):(l=Math.min(l,f.left),u=Math.max(u,f.right))}var g=s.cellsInRect({left:l,top:c,right:a?u:l+1,bottom:a?c+1:d}),m=d-c===1?g:s.cellsInRect({left:a?l:u-1,top:a?d-1:c,right:u,bottom:d}),v=i.start+g[0],_=i.start+m[m.length-1],b=r.doc.resolve(v),y=r.doc.resolve(_);return p(r.setSelection(new o.CellSelection(y,b)))}}return r}}},W=V("column"),G=V("row"),q=function(e){return function(t){var n=F(t.selection);if(n){var r=o.TableMap.get(n.node);if(e>=0&&e<=r.height){for(var i=n.node,a=_(i.type.schema),s=n.start,l=0;l1&&n+i>e}))(t);f.push.apply(f,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0;g--)p(g);f.length&&f.forEach((function(e){t=Q(e,{rowspan:e.node.attrs.rowspan+1})(t)}))}return d(a.row.create(c.attrs,u),s)(t)}}return t}},K=function(e){return function(t){var n=F(t.selection);if(n){var r=o.TableMap.get(n.node);if(0===e&&1===r.width)return $(t);if(e>=0&&e<=r.width)return o.removeColumn(t,{map:r,tableStart:n.start,table:n.node},e),p(t)}return t}},Y=function(e){return function(t){var n=F(t.selection);if(n){var r=o.TableMap.get(n.node);if(0===e&&1===r.height)return $(t);if(e>=0&&e<=r.height)return o.removeRow(t,{map:r,tableStart:n.start,table:n.node},e),p(t)}return t}},$=function(e){for(var t=e.selection.$from,n=t.depth;n>0;n--){if("table"===t.node(n).type.spec.tableRole)return p(e.delete(t.before(n),t.after(n)))}return e},Q=function(e,t){return function(n){return e?(n.setNodeMarkup(e.pos,null,Object.assign({},e.node.attrs,t)),p(n)):n}},Z=function(e){return N(e,(function(e){return e.type.spec.tableRole&&/cell/i.test(e.type.spec.tableRole)}))},X=function(e){var t=Z(e);if(t){var n=function(e){return N(e,(function(e){return e.type.spec.tableRole&&/table/i.test(e.type.spec.tableRole)}))}(e),r=o.TableMap.get(n.node),i=t.pos-n.start;return r.rectBetween(i,i)}},J=function(e,t){return function(n){var r=[],i=z(e)(n.selection);if(i)for(var o=i.length-1;o>=0;o--)t(i[o],n)&&r.push(i[o]);return r}},ee=function(e){return function(t){for(var n=e,r=e,i=function(e){var i=H(e)(t.selection);i&&i.forEach((function(t){var i=t.node.attrs.colspan+e-1;i>=n&&(n=e),i>r&&(r=i)}))},o=e;o>=0;o--)i(o);var a=function(e){var n=H(e)(t.selection);n&&n.forEach((function(t){var n=t.node.attrs.colspan+e-1;t.node.attrs.colspan>1&&n>r&&(r=n)}))};for(o=e;o<=r;o++)a(o);var s=[];for(o=n;o<=r;o++){var l=H(o)(t.selection);l&&l.length&&s.push(o)}n=s[0],r=s[s.length-1];for(var c=H(n)(t.selection),u=z(0)(t.selection),d=t.doc.resolve(c[c.length-1].pos),h=void 0,f=r;f>=n;f--){var p=H(f)(t.selection);if(p&&p.length){for(var g=u.length-1;g>=0;g--)if(u[g].pos===p[0].pos){h=p[0];break}if(h)break}}return{$anchor:d,$head:t.doc.resolve(h.pos),indexes:s}}},te=function(e){return function(t){for(var n=e,r=e,i=function(e){z(e)(t.selection).forEach((function(t){var i=t.node.attrs.rowspan+e-1;i>=n&&(n=e),i>r&&(r=i)}))},o=e;o>=0;o--)i(o);var a=function(e){z(e)(t.selection).forEach((function(t){var n=t.node.attrs.rowspan+e-1;t.node.attrs.rowspan>1&&n>r&&(r=n)}))};for(o=e;o<=r;o++)a(o);var s=[];for(o=n;o<=r;o++){var l=z(o)(t.selection);l&&l.length&&s.push(o)}n=s[0],r=s[s.length-1];for(var c=z(n)(t.selection),u=H(0)(t.selection),d=t.doc.resolve(c[c.length-1].pos),h=void 0,f=r;f>=n;f--){var p=z(f)(t.selection);if(p&&p.length){for(var g=u.length-1;g>=0;g--)if(u[g].pos===p[0].pos){h=p[0];break}if(h)break}}return{$anchor:d,$head:t.doc.resolve(h.pos),indexes:s}}};t.isNodeSelection=h,t.canInsert=b,t.convertTableNodeToArrayOfRows=E,t.convertArrayOfRowsToTableNode=w,t.findParentNode=x,t.findParentNodeClosestToPos=N,t.findParentDomRef=D,t.hasParentNode=L,t.findParentNodeOfType=A,t.findParentNodeOfTypeClosestToPos=function(e,t){return N(e,(function(e){return f(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return L((function(t){return f(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return D((function(t){return f(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(h(t)){var n=t.node,r=t.$from;if(f(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=I,t.findDomRefAtPos=R,t.flatten=M,t.findChildren=P,t.findTextNodes=function(e,t){return P(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return P(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return P(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return P(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=j,t.findChildrenByMark=function(e,t,n){return P(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!j(e,t).length},t.findTable=F,t.isCellSelection=B,t.getSelectionRect=function(e){if(B(e)){var t=e.$anchorCell.start(-1);return o.TableMap.get(e.$anchorCell.node(-1)).rectBetween(e.$anchorCell.pos-t,e.$headCell.pos-t)}},t.isColumnSelected=function(e){return function(t){if(B(t)){var n=o.TableMap.get(t.$anchorCell.node(-1));return C({left:e,right:e+1,top:0,bottom:n.height})(t)}return!1}},t.isRowSelected=function(e){return function(t){if(B(t)){var n=o.TableMap.get(t.$anchorCell.node(-1));return C({left:0,right:n.width,top:e,bottom:e+1})(t)}return!1}},t.isTableSelected=U,t.getCellsInColumn=H,t.getCellsInRow=z,t.getCellsInTable=function(e){var t=F(e);if(t){var n=o.TableMap.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map((function(e){var n=t.node.nodeAt(e),r=e+t.start;return{pos:r,start:r+1,node:n}}))}},t.selectColumn=W,t.selectRow=G,t.selectTable=function(e){var t=F(e.selection);if(t){var n=o.TableMap.get(t.node).map;if(n&&n.length){var r=t.start+n[0],i=t.start+n[n.length-1],a=e.doc.resolve(r),s=e.doc.resolve(i);return p(e.setSelection(new o.CellSelection(s,a)))}}return e},t.emptyCell=function(e,t){return function(n){if(e){var r=_(t).cell.createAndFill().content;if(!e.node.content.eq(r))return n.replaceWith(e.pos+1,e.pos+e.node.nodeSize,r),p(n)}return n}},t.addColumnAt=function(e){return function(t){var n=F(t.selection);if(n){var r=o.TableMap.get(n.node);if(e>=0&&e<=r.width)return p(o.addColumn(t,{map:r,tableStart:n.start,table:n.node},e))}return t}},t.moveRow=function(e,t,n){return function(r){var i=Object.assign({tryToFit:!1,direction:0},n),o=F(r.selection);if(!o)return r;var a=te(e)(r).indexes,s=te(t)(r).indexes;if(a.indexOf(t)>-1)return r;!i.tryToFit&&s.length>1&&T(e,t,s,"row");var l=function(e,t,n,r){var i=E(e.node);return i=O(i,t,n,r),w(e.node,i)}(o,a,s,i.direction);return p(r).replaceWith(o.pos,o.pos+o.node.nodeSize,l)}},t.moveColumn=function(e,t,n){return function(r){var i=Object.assign({tryToFit:!1,direction:0},n),o=F(r.selection);if(!o)return r;var a=ee(e)(r).indexes,s=ee(t)(r).indexes;if(a.indexOf(t)>-1)return r;!i.tryToFit&&s.length>1&&T(e,t,s,"column");var l=function(e,t,n,r){var i=k(E(e.node));return i=O(i,t,n,r),i=k(i),w(e.node,i)}(o,a,s,i.direction);return p(r).replaceWith(o.pos,o.pos+o.node.nodeSize,l)}},t.addRowAt=function(e,t){return function(n){var r=F(n.selection);if(r){var i=o.TableMap.get(r.node),a=e-1;if(t&&a>=0)return p(q(a)(n));if(e>=0&&e<=i.height)return p(o.addRow(n,{map:i,tableStart:r.start,table:r.node},e))}return n}},t.cloneRowAt=q,t.removeColumnAt=K,t.removeRowAt=Y,t.removeTable=$,t.removeSelectedColumns=function(e){var t=e.selection;if(U(t))return $(e);if(B(t)){var n=F(t);if(n){var r=o.TableMap.get(n.node),i=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==i.left&&i.right==r.width)return!1;for(var a=Object.assign({},i,{map:r,table:n.node,tableStart:n.start}),s=a.right-1;o.removeColumn(e,a,s),s!==a.left;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=o.TableMap.get(a.table);return p(e)}}return e},t.removeSelectedRows=function(e){var t=e.selection;if(U(t))return $(e);if(B(t)){var n=F(t);if(n){var r=o.TableMap.get(n.node),i=r.rectBetween(t.$anchorCell.pos-n.start,t.$headCell.pos-n.start);if(0==i.top&&i.bottom==r.height)return!1;for(var a=Object.assign({},i,{map:r,table:n.node,tableStart:n.start}),s=a.bottom-1;o.removeRow(e,a,s),s!==a.top;s--)a.table=a.tableStart?e.doc.nodeAt(a.tableStart-1):e.doc,a.map=o.TableMap.get(a.table);return p(e)}}return e},t.removeColumnClosestToPos=function(e){return function(t){var n=X(e);return n?K(n.left)(l(e.pos)(t)):t}},t.removeRowClosestToPos=function(e){return function(t){var n=X(e);return n?Y(n.top)(l(e.pos)(t)):t}},t.forEachCellInColumn=function(e,t,n){return function(i){var o=H(e)(i.selection);if(o){for(var a=o.length-1;a>=0;a--)i=t(o[a],i);if(n){var s=i.doc.resolve(i.mapping.map(o[o.length-1].pos));i.setSelection(r.Selection.near(s))}return p(i)}return i}},t.forEachCellInRow=function(e,t,n){return function(i){var o=z(e)(i.selection);if(o){for(var a=o.length-1;a>=0;a--)i=t(o[a],i);if(n){var s=i.doc.resolve(i.mapping.map(o[o.length-1].pos));i.setSelection(r.Selection.near(s))}}return i}},t.setCellAttrs=Q,t.createTable=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=_(e),a=o.cell,s=o.header_cell,l=o.row,c=o.table,u=[],d=[],h=0;h"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(50),i=n(51);Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.options=Object.assign(Object.assign({},this.defaultOptions),t)}return i(e,[{key:"bindEditor",value:function(e){this.editor=e}},{key:"keys",value:function(e){return{}}},{key:"inputRules",value:function(e){return[]}},{key:"commands",value:function(e){return function(e){return function(){return!1}}}},{key:"type",get:function(){return"extension"}},{key:"name",get:function(){return""}},{key:"plugins",get:function(){return[]}},{key:"defaultOptions",get:function(){return{}}}]),e}();t.default=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(0),i=n(1),o=function(){function e(t){Object(r.a)(this,e),this._prefix=t,this._lastId=0}return Object(i.a)(e,[{key:"nextId",value:function(){return this._prefix+ ++this._lastId}}]),e}(),a=new o("id#")},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(16),i=n(209);var o=n(267);function a(e){var t="function"===typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return Object(o.a)(e,arguments,Object(r.a)(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(a,e)})(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(4),i=n(5),o=n(0),a=n(1),s=n(29),l=n(39),c=n(33),u=Object(s.c)("IWorkspaceEditService");var d=function(){function e(t){Object(o.a)(this,e),this.metadata=t}return Object(a.a)(e,null,[{key:"convert",value:function(e){return e.edits.map((function(e){if(t=e,Object(c.i)(t)&&l.a.isUri(t.resource)&&Object(c.i)(t.edit))return new h(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return Object(c.i)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new f(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}]),e}(),h=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r,i,a){var s;return Object(o.a)(this,n),(s=t.call(this,a)).resource=e,s.textEdit=r,s.versionId=i,s.metadata=a,s}return n}(d),f=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r,i,a){var s;return Object(o.a)(this,n),(s=t.call(this,a)).oldResource=e,s.newResource=r,s.options=i,s.metadata=a,s}return n}(d)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(22),i=n(0),o=n(1),a=function(){function e(){Object(i.a)(this,e),this._entries=new Map;for(var t=arguments.length,n=new Array(t),o=0;o2&&void 0!==arguments[2]&&arguments[2],a=t.text,s=t.codiconOffsets;if(!s||0===s.length)return Object(i.g)(e,a,n);var l=Object(o.K)(a," "),c=a.length-l.length,u=Object(i.g)(e,l,n);if(u){var d,h=Object(r.a)(u);try{for(h.s();!(d=h.n()).done;){var f=d.value,p=s[f.start+c]+c;f.start+=p,f.end+=p}}catch(g){h.e(g)}finally{h.f()}}return u}},function(e,t,n){var r=n(650),i=n(651),o=n(279),a=n(652);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},function(e,t){e.exports=function(e){return-2===e||-1===e||32===e}},function(e,t){e.exports=function(e,t,r,i){var o,a,s=e.length,l=0;t=t<0?-t>s?0:s+t:t>s?s:t;if(r=r>0?r:0,i.length=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}}},{key:"dispose",value:function(){Object(l.a)(Object(c.a)(n.prototype),"dispose",this).call(this),this.el.remove()}},{key:"state",get:function(){return this._state},set:function(e){this._state!==e&&(Object(_.toggleClass)(this.el,"disabled",0===e),Object(_.toggleClass)(this.el,"minimum",1===e),Object(_.toggleClass)(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}},{key:"orthogonalStartSash",get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables.clear(),e?(this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this)),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e}},{key:"orthogonalEndSash",get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables.clear(),e?(this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this)),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e}}]),n}(h.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(6),i=n(0),o=n(1),a=(n(472),n(473),n(474),n(26)),s=new(function(){function e(){Object(i.a)(this,e),this.onDidChange=a.c.onDidRegister}return Object(o.a)(e,[{key:"getCSS",value:function(){var e,t=[],n=Object(r.a)(a.c.all);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.push(l(i))}}catch(o){n.e(o)}finally{n.f()}return t.join("\n")}}]),e}());function l(e){for(var t=e.definition;t instanceof a.a;)t=t.definition;return".codicon-".concat(e.id,":before { content: '").concat(t.character,"'; }")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var r=n(0),i=n(1),o=n(15),a=function(){function e(t,n,i,o){Object(r.a)(this,e),this.startColumn=t,this.endColumn=n,this.className=i,this.type=o}return Object(i.a)(e,null,[{key:"_equals",value:function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}},{key:"equalsArr",value:function(t,n){var r=t.length;if(r!==n.length)return!1;for(var i=0;in)&&(!u.isEmpty()||0!==c.type&&3!==c.type)){var d=u.startLineNumber===n?u.startColumn:r,h=u.endLineNumber===n?u.endColumn:i;o[a++]=new e(d,h,c.inlineClassName,c.type)}}return o}},{key:"_typeCompare",value:function(e,t){var n=[2,0,1,3];return n[e]-n[t]}},{key:"compare",value:function(t,n){if(t.startColumn===n.startColumn){if(t.endColumn===n.endColumn){var r=e._typeCompare(t.type,n.type);return 0===r?t.classNamen.className?1:0:r}return t.endColumn-n.endColumn}return t.startColumn-n.startColumn}}]),e}(),s=function e(t,n,i,o){Object(r.a)(this,e),this.startOffset=t,this.endOffset=n,this.className=i,this.metadata=o},l=function(){function e(){Object(r.a)(this,e),this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}return Object(i.a)(e,[{key:"consumeLowerThan",value:function(t,n,r){for(;this.count>0&&this.stopOffsets[0]0&&n=e){this.stopOffsets.splice(r,0,e),this.classNames.splice(r,0,t),this.metadata.splice(r,0,n);break}this.count++}}],[{key:"_metadata",value:function(e){for(var t=0,n=0,r=e.length;n1){var p=e.charCodeAt(u-2);o.F(p)&&u--}if(d>1){var g=e.charCodeAt(d-2);o.F(g)&&d--}var m=u-1,v=d-2;i=r.consumeLowerThan(m,i,n),0===r.count&&(i=m),r.insert(v,h,f)}return r.consumeLowerThan(1073741824,i,n),n}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(0),o=n(1),a=n(54),s=n(26),l=n(15),c=function(){function e(t,n){Object(i.a)(this,e),this.supportCodicons=n,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",t.appendChild(this.domNode)}return Object(o.a)(e,[{key:"set",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0;t||(t=""),i&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===r&&a.e(this.highlights,n)||(Array.isArray(n)||(n=[]),this.text=t,this.title=r,this.highlights=n,this.render())}},{key:"render",value:function(){var e,t="",n=0,i=Object(r.a)(this.highlights);try{for(i.s();!(e=i.n()).done;){var o=e.value;if(o.end!==o.start){if(n";var a=this.text.substring(n,o.start);t+=this.supportCodicons?Object(s.f)(Object(l.u)(a)):Object(l.u)(a),t+="",n=o.end}o.extraClasses?t+=''):t+='';var c=this.text.substring(o.start,o.end);t+=this.supportCodicons?Object(s.f)(Object(l.u)(c)):Object(l.u)(c),t+="",n=o.end}}}catch(d){i.e(d)}finally{i.f()}if(n";var u=this.text.substring(n);t+=this.supportCodicons?Object(s.f)(Object(l.u)(u)):Object(l.u)(u),t+=""}this.domNode.innerHTML=t,this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}},{key:"element",get:function(){return this.domNode}}],[{key:"escapeNewLines",value:function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/g,(function(e,o){i="\r\n"===e?-1:0,o+=n;var a,s=Object(r.a)(t);try{for(s.s();!(a=s.n()).done;){var l=a.value;l.end<=o||(l.start>=o&&(l.start+=i),l.end>=o&&(l.end+=i))}}catch(c){s.e(c)}finally{s.f()}return n+=i,"\u23ce"}))}}]),e}()},function(e,t,n){var r=n(519),i=n(520),o=n(279),a=n(521);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"parseMarkdown",value:function(){return{}}},{key:"commands",value:function(e){var t=e.type;return function(){return l.toggleMark(t)}}},{key:"type",get:function(){return"mark"}},{key:"markdownToken",get:function(){return""}},{key:"toMarkdown",get:function(){return{}}}]),n}(s(n(162)).default);t.default=c},function(e,t,n){e.exports=function(e){return r({},e)};var r=n(257)},function(e,t){e.exports=function(e){return e<0||32===e}},function(e,t,n){e.exports=function(e){return function(t){return e.test(r(t))}};var r=n(256)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(229);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return p}));var r=n(0),i=n(1),o=n(15);function a(e){return s(e,0)}function s(e,t){switch(typeof e){case"object":return null===e?l(349,t):Array.isArray(e)?(n=e,r=l(104579,r=t),n.reduce((function(e,t){return s(t,e)}),r)):function(e,t){return t=l(181387,t),Object.keys(e).sort().reduce((function(t,n){return t=c(n,t),s(e[n],t)}),t)}(e,t);case"string":return c(e,t);case"boolean":return function(e,t){return l(e?433:863,t)}(e,t);case"number":return l(e,t);case"undefined":return l(937,t);default:return l(617,t)}var n,r}function l(e,t){return(t<<5)-t+e|0}function c(e,t){t=l(149417,t);for(var n=0,r=e.length;n2&&void 0!==arguments[2]?arguments[2]:32,r=n-t,i=~((1<>>r)>>>0}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=0;i2&&void 0!==arguments[2]?arguments[2]:"0";e.length1&&void 0!==arguments[1]?arguments[1]:32;return h((e>>>0).toString(16),t/4)}var p=function(){function e(){Object(r.a)(this,e),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}return Object(i.a)(e,[{key:"update",value:function(e){var t=e.length;if(0!==t){var n,r,i=this._buff,a=this._buffLen,s=this._leftoverHighSurrogate;for(0!==s?(n=s,r=-1,s=0):(n=e.charCodeAt(0),r=0);;){var l=n;if(o.F(n)){if(!(r+1>>6,e[t++]=128|(63&n)>>>0):n<65536?(e[t++]=224|(61440&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0):(e[t++]=240|(1835008&n)>>>18,e[t++]=128|(258048&n)>>>12,e[t++]=128|(4032&n)>>>6,e[t++]=128|(63&n)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}},{key:"digest",value:function(){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()),f(this._h0)+f(this._h1)+f(this._h2)+f(this._h3)+f(this._h4)}},{key:"_wrapUp",value:function(){this._buff[this._buffLen++]=128,d(this._buff,this._buffLen),this._buffLen>56&&(this._step(),d(this._buff));var e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}},{key:"_step",value:function(){for(var t=e._bigBlock32,n=this._buffDV,r=0;r<64;r+=4)t.setUint32(r,n.getUint32(r,!1),!1);for(var i=64;i<320;i+=4)t.setUint32(i,u(t.getUint32(i-12,!1)^t.getUint32(i-32,!1)^t.getUint32(i-56,!1)^t.getUint32(i-64,!1),1),!1);for(var o,a,s,l=this._h0,c=this._h1,d=this._h2,h=this._h3,f=this._h4,p=0;p<80;p++)p<20?(o=c&d|~c&h,a=1518500249):p<40?(o=c^d^h,a=1859775393):p<60?(o=c&d|c&h|d&h,a=2400959708):(o=c^d^h,a=3395469782),s=u(l,5)+o+f+a+t.getUint32(4*p,!1)&4294967295,f=h,h=d,d=u(c,30),c=l,l=s;this._h0=this._h0+l&4294967295,this._h1=this._h1+c&4294967295,this._h2=this._h2+d&4294967295,this._h3=this._h3+h&4294967295,this._h4=this._h4+f&4294967295}}]),e}();p._bigBlock32=new DataView(new ArrayBuffer(320))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(21),a=o.b.performance&&"function"===typeof o.b.performance.now,s=function(){function e(t){Object(r.a)(this,e),this._highResolution=a&&t,this._startTime=this._now(),this._stopTime=-1}return Object(i.a)(e,[{key:"stop",value:function(){this._stopTime=this._now()}},{key:"elapsed",value:function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}},{key:"_now",value:function(){return this._highResolution?o.b.performance.now():(new Date).getTime()}}],[{key:"create",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new e(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("labelService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n(4),i=n(5),o=n(0),a=n(1),s=n(21),l=n(147),c=s.f?1.5:1.35,u=function(){function e(t){Object(o.a)(this,e),this.zoomLevel=t.zoomLevel,this.fontFamily=String(t.fontFamily),this.fontWeight=String(t.fontWeight),this.fontSize=t.fontSize,this.fontFeatureSettings=t.fontFeatureSettings,this.lineHeight=0|t.lineHeight,this.letterSpacing=t.letterSpacing}return Object(a.a)(e,[{key:"getId",value:function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}},{key:"getMassagedFontFamily",value:function(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?'"'.concat(this.fontFamily,'"'):this.fontFamily}}],[{key:"createFromValidatedSettings",value:function(t,n,r){var i=t.get(35),o=t.get(39),a=t.get(38),s=t.get(37),l=t.get(51),c=t.get(48);return e._create(i,o,a,s,l,c,n,r)}},{key:"_create",value:function(t,n,r,i,o,a,s,u){0===o?o=Math.round(c*r):o<8&&(o=8);var d=1+(u?0:.1*l.a.getZoomLevel());return new e({zoomLevel:s,fontFamily:t,fontWeight:n,fontSize:r*=d,fontFeatureSettings:i,lineHeight:o*=d,letterSpacing:a})}}]),e}(),d=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r){var i;return Object(o.a)(this,n),(i=t.call(this,e)).isTrusted=r,i.isMonospace=e.isMonospace,i.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,i.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,i.spaceWidth=e.spaceWidth,i.middotWidth=e.middotWidth,i.wsmiddotWidth=e.wsmiddotWidth,i.maxDigitWidth=e.maxDigitWidth,i}return Object(a.a)(n,[{key:"equals",value:function(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}}]),n}(u)},function(e,t,n){"use strict";n.d(t,"b",(function(){return S})),n.d(t,"a",(function(){return T})),n.d(t,"d",(function(){return B})),n.d(t,"c",(function(){return U}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(6),l=n(0),c=n(1),u=n(2),d=n(12),h=n(7),f=n(54),p=n(24),g=n(43),m=n(147),v=n(188),_=n(140),b=n(65),y=n(271),S=new(function(){function e(){Object(l.a)(this,e),this._tabFocus=!1,this._onDidChangeTabFocus=new d.a,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return Object(c.a)(e,[{key:"getTabFocusMode",value:function(){return this._tabFocus}},{key:"setTabFocusMode",value:function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}}]),e}()),C=Object.hasOwnProperty,k=function(){function e(){Object(l.a)(this,e),this._values=[]}return Object(c.a)(e,[{key:"_read",value:function(e){return this._values[e]}},{key:"get",value:function(e){return this._values[e]}},{key:"_write",value:function(e,t){this._values[e]=t}}]),e}(),E=function(){function e(){Object(l.a)(this,e),this._values=[]}return Object(c.a)(e,[{key:"_read",value:function(e){return this._values[e]}},{key:"_write",value:function(e,t){this._values[e]=t}}]),e}(),w=function(){function e(){Object(l.a)(this,e)}return Object(c.a)(e,null,[{key:"readOptions",value:function(e){var t,n=e,r=new E,i=Object(s.a)(g.k);try{for(i.s();!(t=i.n()).done;){var o=t.value,a="_never_"===o.name?void 0:n[o.name];r._write(o.id,a)}}catch(l){i.e(l)}finally{i.f()}return r}},{key:"validateOptions",value:function(e){var t,n=new g.j,r=Object(s.a)(g.k);try{for(r.s();!(t=r.n()).done;){var i=t.value;n._write(i.id,i.validate(e._read(i.id)))}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"computeOptions",value:function(e,t){var n,r=new k,i=Object(s.a)(g.k);try{for(i.s();!(n=i.n()).done;){var o=n.value;r._write(o.id,o.compute(t,r,e._read(o.id)))}}catch(a){i.e(a)}finally{i.f()}return r}},{key:"_deepEquals",value:function(t,n){if("object"!==typeof t||"object"!==typeof n)return t===n;if(Array.isArray(t)||Array.isArray(n))return!(!Array.isArray(t)||!Array.isArray(n))&&p.g(t,n);for(var r in t)if(!e._deepEquals(t[r],n[r]))return!1;return!0}},{key:"checkEquals",value:function(t,n){var r,i=[],o=!1,a=Object(s.a)(g.k);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=!e._deepEquals(t._read(l.id),n._read(l.id));i[l.id]=c,c&&(o=!0)}}catch(u){a.e(u)}finally{a.f()}return o?new g.b(i):null}}]),e}();function O(e){var t=f.c(e);return function(e){var t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");var n=e.lineNumbers;!0===n?e.lineNumbers="on":!1===n&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");var r=e.renderWhitespace;!0===r?e.renderWhitespace="boundary":!1===r&&(e.renderWhitespace="none");var i=e.renderLineHighlight;!0===i?e.renderLineHighlight="line":!1===i&&(e.renderLineHighlight="none");var o=e.acceptSuggestionOnEnter;!0===o?e.acceptSuggestionOnEnter="on":!1===o&&(e.acceptSuggestionOnEnter="off");var a=e.tabCompletion;!1===a?e.tabCompletion="off":!0===a&&(e.tabCompletion="onlySnippets");var s=e.suggest;if(s&&"object"===typeof s.filteredTypes&&s.filteredTypes){var l={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"};Object(y.b)(l,(function(e){var t=s.filteredTypes[e.key];!1===t&&(s[e.value]=t)}))}var c=e.hover;!0===c?e.hover={enabled:!0}:!1===c&&(e.hover={enabled:!1});var u=e.parameterHints;!0===u?e.parameterHints={enabled:!0}:!1===u&&(e.parameterHints={enabled:!1});var d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");var h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never")}(t),t}var T=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(l.a)(this,n),(i=t.call(this))._onDidChange=i._register(new d.a),i.onDidChange=i._onDidChange.event,i._onDidChangeFast=i._register(new d.a),i.onDidChangeFast=i._onDidChangeFast.event,i.isSimpleWidget=e,i._isDominatedByLongLines=!1,i._computeOptionsMemory=new g.a,i._viewLineCount=1,i._lineNumbersDigitCount=1,i._rawOptions=O(r),i._readOptions=w.readOptions(i._rawOptions),i._validatedOptions=w.validateOptions(i._readOptions),i._register(m.a.onDidChangeZoomLevel((function(e){return i._recomputeOptions()}))),i._register(S.onDidChangeTabFocus((function(e){return i._recomputeOptions()}))),i}return Object(c.a)(n,[{key:"observeReferenceElement",value:function(e){}},{key:"dispose",value:function(){Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"_recomputeOptions",value:function(){var e=this.options,t=this._computeInternalOptions();if(e){var n=w.checkEquals(e,t);if(null===n)return;this.options=t,this._onDidChangeFast.fire(n),this._onDidChange.fire(n)}else this.options=t}},{key:"getRawOptions",value:function(){return this._rawOptions}},{key:"_computeInternalOptions",value:function(){var e=this._getEnvConfiguration(),t=v.a.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,this.isSimpleWidget),n={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:S.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return w.computeOptions(this._validatedOptions,n)}},{key:"updateOptions",value:function(e){if("undefined"!==typeof e){var t=O(e);n._subsetEquals(this._rawOptions,t)||(this._rawOptions=f.g(this._rawOptions,t||{}),this._readOptions=w.readOptions(this._rawOptions),this._validatedOptions=w.validateOptions(this._readOptions),this._recomputeOptions())}}},{key:"setIsDominatedByLongLines",value:function(e){this._isDominatedByLongLines=e,this._recomputeOptions()}},{key:"setMaxLineNumber",value:function(e){var t=n._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}},{key:"setViewLineCount",value:function(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}}],[{key:"_subsetEquals",value:function(e,t){for(var n in t)if(C.call(t,n)){var r=t[n],i=e[n];if(i===r)continue;if(Array.isArray(i)&&Array.isArray(r)){if(!p.g(i,r))return!1;continue}if(i&&"object"===typeof i&&r&&"object"===typeof r){if(!this._subsetEquals(i,r))return!1;continue}return!1}return!0}},{key:"_digitCount",value:function(e){for(var t=0;e;)e=Math.floor(e/10),t++;return t||1}}]),n}(h.a),x=Object.freeze({id:"editor",order:5,type:"object",title:u.a("editorConfigurationTitle","Editor"),scope:5}),N=b.a.as(_.a.Configuration),D=Object.assign(Object.assign({},x),{properties:{"editor.tabSize":{type:"number",default:g.d.tabSize,minimum:1,markdownDescription:u.a("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:g.d.insertSpaces,markdownDescription:u.a("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:g.d.detectIndentation,markdownDescription:u.a("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:g.d.trimAutoWhitespace,description:u.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:g.d.largeFileOptimizations,description:u.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:u.a("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[u.a("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),u.a("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),u.a("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:u.a("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:u.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:u.a("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:u.a("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:u.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:u.a("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:u.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:u.a("codeLens","Controls whether the editor shows CodeLens.")}}});var L,A,I=Object(s.a)(g.k);try{for(I.s();!(L=I.n()).done;){var R=L.value,M=R.schema;if("undefined"!==typeof M)if("undefined"!==typeof(A=M).type||"undefined"!==typeof A.anyOf)D.properties["editor.".concat(R.name)]=M;else for(var P in M)C.call(M,P)&&(D.properties[P]=M[P])}}catch(H){I.e(H)}finally{I.f()}var j=null;function F(){return null===j&&(j=Object.create(null),Object.keys(D.properties).forEach((function(e){j[e]=!0}))),j}function B(e){return F()["editor.".concat(e)]||!1}function U(e){return F()["diffEditor.".concat(e)]||!1}N.registerConfiguration(D)},function(e,t,n){"use strict";n.d(t,"a",(function(){return N})),n.d(t,"b",(function(){return I}));var r=n(6),i=n(27),o=n(0),a=n(1),s=n(54),l=n(7),c=n(70),u=n(3),d=n(12),h=n(52),f=n(109),p=n(211),g=n(105);function m(e,t){var n,i=[],o=Object(r.a)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(!(e.start>=a.range.end)){if(e.end2&&void 0!==arguments[2]?arguments[2]:[],r=n.length-t,i=m({start:0,end:e},this.groups),o=m({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((function(e){return{range:v(e.range,r),size:e.size}})),a=n.map((function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}}));this.groups=b(i,a,o),this._size=this.groups.reduce((function(e,t){return e+t.size*(t.range.end-t.range.start)}),0)}},{key:"indexAt",value:function(e){if(e<0)return-1;var t,n=0,i=0,o=Object(r.a)(this.groups);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.range.end-a.range.start,l=i+s*a.size;if(e=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},x={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:function(e){return[e]},getDragURI:function(){return null},onDragStart:function(){},onDragOver:function(){return!1},drop:function(){}},horizontalScrolling:!1,transformOptimization:!0},N=function(){function e(t){Object(o.a)(this,e),this.elements=t}return Object(a.a)(e,[{key:"update",value:function(){}},{key:"getData",value:function(){return this.elements}}]),e}(),D=function(){function e(t){Object(o.a)(this,e),this.elements=t}return Object(a.a)(e,[{key:"update",value:function(){}},{key:"getData",value:function(){return this.elements}}]),e}(),L=function(){function e(){Object(o.a)(this,e),this.types=[],this.files=[]}return Object(a.a)(e,[{key:"update",value:function(e){var t;e.types&&(t=this.types).splice.apply(t,[0,this.types.length].concat(Object(i.a)(e.types)));if(e.files){this.files.splice(0,this.files.length);for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:x;if(Object(o.a)(this,e),this.virtualDelegate=n,this.domId="list_id_".concat(++e.InstanceCount),this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new w.a(50),this.splicing=!1,this.dragOverAnimationStopDisposable=l.a.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=l.a.None,this.onDragLeaveTimeout=l.a.None,this.disposables=new l.b,this._onDidChangeContentHeight=new d.a,this._horizontalScrolling=!1,g.horizontalScrolling&&g.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new y;var m,v=Object(r.a)(i);try{for(v.s();!(m=v.n()).done;){var _=m.value;this.renderers.set(_.templateId,_)}}catch(C){v.e(C)}finally{v.f()}this.cache=this.disposables.add(new S(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",u.addClass(this.domNode,this.domId),this.domNode.tabIndex=0,u.toggleClass(this.domNode,"mouse-support","boolean"!==typeof g.mouseSupport||g.mouseSupport),this._horizontalScrolling=Object(s.f)(g,(function(e){return e.horizontalScrolling}),x.horizontalScrolling),u.toggleClass(this.domNode,"horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight="undefined"===typeof g.additionalScrollHeight?0:g.additionalScrollHeight,this.accessibilityProvider=new A(g.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";var b=Object(s.f)(g,(function(e){return e.transformOptimization}),x.transformOptimization);b&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(c.b.addTarget(this.rowsContainer)),this.scrollable=new p.a(Object(s.f)(g,(function(e){return e.smoothScrolling}),!1)?125:0,(function(e){return u.scheduleAtNextAnimationFrame(e)})),this.scrollableElement=this.disposables.add(new f.c(this.rowsContainer,{alwaysConsumeMouseWheel:!0,horizontal:1,vertical:Object(s.f)(g,(function(e){return e.verticalScrollMode}),x.verticalScrollMode),useShadows:Object(s.f)(g,(function(e){return e.useShadows}),x.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),t.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),Object(h.a)(this.rowsContainer,c.a.Change)(this.onTouchChange,this,this.disposables),Object(h.a)(this.scrollableElement.getDomNode(),"scroll")((function(e){return e.target.scrollTop=0}),null,this.disposables),d.b.map(Object(h.a)(this.domNode,"dragover"),(function(e){return a.toDragEvent(e)}))(this.onDragOver,this,this.disposables),d.b.map(Object(h.a)(this.domNode,"drop"),(function(e){return a.toDragEvent(e)}))(this.onDrop,this,this.disposables),Object(h.a)(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),Object(h.a)(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=Object(s.f)(g,(function(e){return e.setRowLineHeight}),x.setRowLineHeight),this.setRowHeight=Object(s.f)(g,(function(e){return e.setRowHeight}),x.setRowHeight),this.supportDynamicHeights=Object(s.f)(g,(function(e){return e.supportDynamicHeights}),x.supportDynamicHeights),this.dnd=Object(s.f)(g,(function(e){return e.dnd}),x.dnd),this.layout()}return Object(a.a)(e,[{key:"updateOptions",value:function(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)}},{key:"splice",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}},{key:"_splice",value:function(e,t){for(var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},c=g.a.intersect(a,s),u=c.start;u=this.items.length?(this.rangeMap=new y,this.rangeMap.splice(0,0,_),this.items=_,d=[]):(this.rangeMap.splice(e,t,_),d=(h=this.items).splice.apply(h,[e,t].concat(Object(i.a)(_))));for(var b=o.length-t,S=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),C=v(p,b),k=g.a.intersect(S,C),E=k.start;E5&&void 0!==arguments[5]&&arguments[5],s=this.getRenderRange(t,n),l=g.a.relativeComplement(s,e),c=g.a.relativeComplement(e,s),u=this.getNextToLastElement(l);if(a)for(var d=g.a.intersect(e,s),h=d.start;h=-1&&en&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}}},{key:"teardownDragAndDropScrollTopAnimation",value:function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}},{key:"getItemIndexFromEventTarget",value:function(e){for(var t=this.scrollableElement.getDomNode(),n=e;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){var r=n.getAttribute("data-index");if(r){var i=Number(r);if(!isNaN(i))return i}n=n.parentElement}}},{key:"getRenderRange",value:function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}},{key:"_rerender",value:function(e,t){var n,i,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,i=0):o.end-o.start>1&&(n=o.start+1,i=this.elementTop(n)-e);for(var a=0;;){for(var s=this.getRenderRange(e,t),l=!1,c=s.start;c1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this.ctor=t,this.staticArguments=n,this.supportsDelayedInstantiation=i}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var r=Ne(n(567)),i=Ne(n(568)),o=Ne(n(569)),a=Ne(n(570)),s=Ne(n(571)),l=Ne(n(572)),c=Ne(n(573)),u=Ne(n(574)),d=Ne(n(575)),h=Ne(n(576)),f=Ne(n(577)),p=Ne(n(578)),g=Ne(n(579)),m=Ne(n(580)),v=Ne(n(581)),_=Ne(n(582)),b=Ne(n(583)),y=Ne(n(584)),S=Ne(n(585)),C=Ne(n(586)),k=Ne(n(587)),E=Ne(n(588)),w=Ne(n(589)),O=Ne(n(590)),T=Ne(n(591)),x=Ne(n(592)),N=Ne(n(593)),D=Ne(n(594)),L=Ne(n(595)),A=Ne(n(596)),I=Ne(n(597)),R=Ne(n(598)),M=Ne(n(599)),P=Ne(n(600)),j=Ne(n(601)),F=Ne(n(602)),B=Ne(n(42)),U=Ne(n(603)),H=Ne(n(604)),z=Ne(n(605)),V=Ne(n(606)),W=Ne(n(607)),G=Ne(n(608)),q=Ne(n(609)),K=Ne(n(610)),Y=Ne(n(611)),$=Ne(n(612)),Q=Ne(n(613)),Z=Ne(n(614)),X=Ne(n(615)),J=Ne(n(616)),ee=Ne(n(617)),te=Ne(n(618)),ne=Ne(n(619)),re=Ne(n(620)),ie=Ne(n(621)),oe=Ne(n(622)),ae=Ne(n(623)),se=Ne(n(624)),le=Ne(n(625)),ce=Ne(n(626)),ue=Ne(n(627)),de=Ne(n(628)),he=Ne(n(629)),fe=Ne(n(630)),pe=Ne(n(631)),ge=Ne(n(632)),me=Ne(n(633)),ve=Ne(n(634)),_e=Ne(n(635)),be=Ne(n(636)),ye=Ne(n(637)),Se=Ne(n(638)),Ce=Ne(n(639)),ke=Ne(n(640)),Ee=Ne(n(641)),we=Ne(n(642)),Oe=Ne(n(643)),Te=Ne(n(644)),xe=Ne(n(645));function Ne(e){return e&&e.__esModule?e:{default:e}}e.exports={AcademicCapIcon:r.default,AlignCenterIcon:i.default,AlignLeftIcon:o.default,AlignRightIcon:a.default,ArchiveIcon:s.default,BackIcon:l.default,BeakerIcon:c.default,BillingIcon:u.default,BlockQuoteIcon:d.default,BoldIcon:h.default,BuildingBlocksIcon:f.default,BulletedListIcon:p.default,CheckboxIcon:g.default,CheckmarkIcon:m.default,CloseIcon:v.default,CloudIcon:_.default,CodeIcon:b.default,CoinsIcon:y.default,CollapsedIcon:S.default,CollectionIcon:C.default,CommentIcon:k.default,DocumentIcon:E.default,EditIcon:w.default,EmailIcon:O.default,ExpandedIcon:T.default,EyeIcon:x.default,GlobeIcon:N.default,GoToIcon:D.default,GroupIcon:L.default,HashtagIcon:A.default,Heading1Icon:I.default,Heading2Icon:R.default,Heading3Icon:M.default,HighlightIcon:P.default,HomeIcon:j.default,HorizontalRuleIcon:F.default,Icon:B.default,ImageIcon:U.default,InfoIcon:H.default,InputIcon:z.default,InsertAboveIcon:V.default,InsertBelowIcon:W.default,InsertLeftIcon:G.default,InsertRightIcon:q.default,ItalicIcon:K.default,JournalIcon:Y.default,KeyboardIcon:$.default,LeafIcon:Q.default,LightBulbIcon:Z.default,LinkIcon:X.default,MenuIcon:J.default,MoonIcon:ee.default,MoreIcon:te.default,NewDocumentIcon:ne.default,NextIcon:re.default,NotepadIcon:ie.default,OpenIcon:oe.default,OrderedListIcon:ae.default,PadlockIcon:se.default,PaletteIcon:le.default,PinIcon:ce.default,PlusIcon:ue.default,PrivateCollectionIcon:de.default,ProfileIcon:he.default,QuestionMarkIcon:fe.default,SearchIcon:pe.default,SettingsIcon:ge.default,ShapesIcon:me.default,StarredIcon:ve.default,StrikethroughIcon:_e.default,SunIcon:be.default,TableIcon:ye.default,TableOfContentsIcon:Se.default,TeamIcon:Ce.default,TemplateIcon:ke.default,TodoListIcon:Ee.default,TrashIcon:we.default,UserIcon:Oe.default,VehicleIcon:Te.default,WarningIcon:xe.default}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Zr}));var r=n(22),i=n(6),o=n(36),a=n(17),s=n(16),l=n(4),c=n(5),u=n(0),d=n(1),h=(n(451),n(2)),f=n(3),p=n(25),g=n(12),m=n(7),v=n(53),_=n(92),b=n(9),y=n(49),S=n(34),C=n(47),k=n(21),E=n(70),w=n(77),O=n(32),T=n(46),x=n(107),N=function(){function e(t,n){Object(u.a)(this,e),this.x=t,this.y=n}return Object(d.a)(e,[{key:"toClientCoordinates",value:function(){return new D(this.x-f.StandardWindow.scrollX,this.y-f.StandardWindow.scrollY)}}]),e}(),D=function(){function e(t,n){Object(u.a)(this,e),this.clientX=t,this.clientY=n}return Object(d.a)(e,[{key:"toPageCoordinates",value:function(){return new N(this.clientX+f.StandardWindow.scrollX,this.clientY+f.StandardWindow.scrollY)}}]),e}(),L=function e(t,n,r,i){Object(u.a)(this,e),this.x=t,this.y=n,this.width=r,this.height=i};function A(e){var t=f.getDomNodePagePosition(e);return new L(t.left,t.top,t.width,t.height)}var I=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;return Object(u.a)(this,n),(i=t.call(this,e)).pos=new N(i.posx,i.posy),i.editorPos=A(r),i}return n}(w.a),R=function(){function e(t){Object(u.a)(this,e),this._editorViewDomNode=t}return Object(d.a)(e,[{key:"_create",value:function(e){return new I(e,this._editorViewDomNode)}},{key:"onContextMenu",value:function(e,t){var n=this;return f.addDisposableListener(e,"contextmenu",(function(e){t(n._create(e))}))}},{key:"onMouseUp",value:function(e,t){var n=this;return f.addDisposableListener(e,"mouseup",(function(e){t(n._create(e))}))}},{key:"onMouseDown",value:function(e,t){var n=this;return f.addDisposableListener(e,"mousedown",(function(e){t(n._create(e))}))}},{key:"onMouseLeave",value:function(e,t){var n=this;return f.addDisposableNonBubblingMouseOutListener(e,(function(e){t(n._create(e))}))}},{key:"onMouseMoveThrottled",value:function(e,t,n,r){var i=this;return f.addDisposableThrottledListener(e,"mousemove",t,(function(e,t){return n(e,i._create(t))}),r)}}]),e}(),M=function(){function e(t){Object(u.a)(this,e),this._editorViewDomNode=t}return Object(d.a)(e,[{key:"_create",value:function(e){return new I(e,this._editorViewDomNode)}},{key:"onPointerUp",value:function(e,t){var n=this;return f.addDisposableListener(e,"pointerup",(function(e){t(n._create(e))}))}},{key:"onPointerDown",value:function(e,t){var n=this;return f.addDisposableListener(e,"pointerdown",(function(e){t(n._create(e))}))}},{key:"onPointerLeave",value:function(e,t){var n=this;return f.addDisposableNonBubblingPointerOutListener(e,(function(e){t(n._create(e))}))}},{key:"onPointerMoveThrottled",value:function(e,t,n,r){var i=this;return f.addDisposableThrottledListener(e,"pointermove",t,(function(e,t){return n(e,i._create(t))}),r)}}]),e}(),P=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this))._editorViewDomNode=e,r._globalMouseMoveMonitor=r._register(new x.a),r._keydownListener=null,r}return Object(d.a)(n,[{key:"startMonitoring",value:function(e,t,n,r,i){var o=this;this._keydownListener=f.addStandardDisposableListener(document,"keydown",(function(e){e.toKeybinding().isModifierKey()||o._globalMouseMoveMonitor.stopMonitoring(!0)}),!0);this._globalMouseMoveMonitor.startMonitoring(e,t,(function(e,t){return n(e,new I(t,o._editorViewDomNode))}),r,(function(){o._keydownListener.dispose(),i()}))}}]),n}(m.a),j=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.call(this))._shouldRender=!0,e}return Object(d.a)(n,[{key:"shouldRender",value:function(){return this._shouldRender}},{key:"forceShouldRender",value:function(){this._shouldRender=!0}},{key:"setShouldRender",value:function(){this._shouldRender=!0}},{key:"onDidRender",value:function(){this._shouldRender=!1}},{key:"onConfigurationChanged",value:function(e){return!1}},{key:"onCursorStateChanged",value:function(e){return!1}},{key:"onDecorationsChanged",value:function(e){return!1}},{key:"onFlushed",value:function(e){return!1}},{key:"onFocusChanged",value:function(e){return!1}},{key:"onLanguageConfigurationChanged",value:function(e){return!1}},{key:"onLineMappingChanged",value:function(e){return!1}},{key:"onLinesChanged",value:function(e){return!1}},{key:"onLinesDeleted",value:function(e){return!1}},{key:"onLinesInserted",value:function(e){return!1}},{key:"onRevealRangeRequest",value:function(e){return!1}},{key:"onScrollChanged",value:function(e){return!1}},{key:"onThemeChanged",value:function(e){return!1}},{key:"onTokensChanged",value:function(e){return!1}},{key:"onTokensColorsChanged",value:function(e){return!1}},{key:"onZonesChanged",value:function(e){return!1}},{key:"handleEvents",value:function(e){for(var t=!1,n=0,r=e.length;n=l?i=Math.max(i,l+c-r):(t[n++]=new z(r,i),r=l,i=c)}return t[n++]=new z(r,i),t}},{key:"_createHorizontalRangesFromClientRects",value:function(e,t){if(!e||0===e.length)return null;for(var n=[],r=0,i=e.length;rs)return null;if((t=Math.min(s,Math.max(0,t)))===(r=Math.min(s,Math.max(0,r)))&&n===i&&0===n){var l=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(l,o)}t!==r&&r>0&&0===i&&(r--,i=1073741824);var c=e.children[t].firstChild,u=e.children[r].firstChild;if(c&&u||(!c&&0===n&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!u&&0===i&&r>0&&(u=e.children[r-1].firstChild,i=1073741824)),!c||!u)return null;n=Math.min(c.textContent.length,Math.max(0,n)),i=Math.min(u.textContent.length,Math.max(0,i));var d=this._readClientRects(c,n,u,i,a);return this._createHorizontalRangesFromClientRects(d,o)}}]),e}(),K=n(177),Y=n(95),$=n(30),Q=n(43),Z=!!k.g||!(k.d||T.h||T.j),X=!0,J=T.f,ee=function(){function e(t,n){Object(u.a)(this,e),this._domNode=t,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=n}return Object(d.a)(e,[{key:"clientRectDeltaLeft",get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}]),e}(),te=function(){function e(t,n){Object(u.a)(this,e),this.themeType=n;var r=t.options,i=r.get(36);this.renderWhitespace=r.get(80),this.renderControlCharacters=r.get(74),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!r.get(24),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=r.get(51),this.stopRenderingLineAfter=r.get(95),this.fontLigatures=r.get(37)}return Object(d.a)(e,[{key:"equals",value:function(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}}]),e}(),ne=function(){function e(t){Object(u.a)(this,e),this._options=t,this._isMaybeInvalid=!0,this._renderedViewLine=null}return Object(d.a)(e,[{key:"getDomNode",value:function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}},{key:"setDomNode",value:function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(C.b)(e)}},{key:"onContentChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onTokensChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onDecorationsChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onOptionsChanged",value:function(e){this._isMaybeInvalid=!0,this._options=e}},{key:"onSelectionChanged",value:function(){return!(!J&&this._options.themeType!==$.b&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}},{key:"renderLine",value:function(t,n,r,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var a=r.getViewLineRenderingData(t),s=this._options,l=K.a.filter(a.inlineDecorations,t,a.minColumn,a.maxColumn),c=null;if(J||s.themeType===$.b||"selection"===this._options.renderWhitespace){var u,d=r.selections,h=Object(i.a)(d);try{for(h.s();!(u=h.n()).done;){var f=u.value;if(!(f.endLineNumbert)){var p=f.startLineNumber===t?f.startColumn:a.minColumn,g=f.endLineNumber===t?f.endColumn:a.maxColumn;p');var v=Object(Y.d)(m,o);o.appendASCIIString("");var _=null;return X&&Z&&a.isBasicASCII&&s.useMonospaceOptimizations&&0===v.containsForeignElements&&a.content.length<300&&m.lineTokens.getCount()<100&&(_=new re(this._renderedViewLine?this._renderedViewLine.domNode:null,m,v.characterMapping)),_||(_=ae(this._renderedViewLine?this._renderedViewLine.domNode:null,m,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=_,!0}},{key:"layoutLine",value:function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}},{key:"getWidth",value:function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}},{key:"getWidthIsFast",value:function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}},{key:"needsMonospaceFontCheck",value:function(){return!!this._renderedViewLine&&this._renderedViewLine instanceof re}},{key:"monospaceAssumptionsAreValid",value:function(){return this._renderedViewLine&&this._renderedViewLine instanceof re?this._renderedViewLine.monospaceAssumptionsAreValid():X}},{key:"onMonospaceAssumptionsInvalidated",value:function(){this._renderedViewLine&&this._renderedViewLine instanceof re&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}},{key:"getVisibleRangesForRange",value:function(e,t,n){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));var r=0|this._renderedViewLine.input.stopRenderingLineAfter,i=!1;-1!==r&&e>r+1&&t>r+1&&(i=!0),-1!==r&&e>r+1&&(e=r+1),-1!==r&&t>r+1&&(t=r+1);var o=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return o&&o.length>0?new W(i,o):null}},{key:"getColumnOfNodeOffset",value:function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}]),e}();ne.CLASS_NAME="view-line";var re=function(){function e(t,n,r){Object(u.a)(this,e),this.domNode=t,this.input=n,this._characterMapping=r,this._charWidth=n.spaceWidth}return Object(d.a)(e,[{key:"getWidth",value:function(){return this._getCharPosition(this._characterMapping.length)}},{key:"getWidthIsFast",value:function(){return!0}},{key:"monospaceAssumptionsAreValid",value:function(){if(!this.domNode)return X;var 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!"),X=!1),X}},{key:"toSlowRenderedLine",value:function(){return ae(this.domNode,this.input,this._characterMapping,!1,0)}},{key:"getVisibleRangesForRange",value:function(e,t,n){var r=this._getCharPosition(e),i=this._getCharPosition(t);return[new z(r,i-r)]}},{key:"_getCharPosition",value:function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}},{key:"getColumnOfNodeOffset",value:function(e,t,n){for(var r=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,r,n)+1}}]),e}(),ie=function(){function e(t,n,r,i,o){if(Object(u.a)(this,e),this.domNode=t,this.input=n,this._characterMapping=r,this._isWhitespaceOnly=/^\s*$/.test(n.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var a=0,s=this._characterMapping.length;a<=s;a++)this._pixelOffsetCache[a]=-1}}return Object(d.a)(e,[{key:"_getReadingTarget",value:function(e){return e.domNode.firstChild}},{key:"getWidth",value:function(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}},{key:"getWidthIsFast",value:function(){return-1!==this._cachedWidth}},{key:"getVisibleRangesForRange",value:function(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){var r=this._readPixelOffset(this.domNode,e,n);if(-1===r)return null;var i=this._readPixelOffset(this.domNode,t,n);return-1===i?null:[new z(r,i-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)}},{key:"_readVisibleRangesForRange",value:function(e,t,n,r){if(t===n){var i=this._readPixelOffset(e,t,r);return-1===i?null:[new z(i,0)]}return this._readRawVisibleRangesForRange(e,t,n,r)}},{key:"_readPixelOffset",value:function(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();var r=this._getReadingTarget(e);return r.firstChild?r.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){var i=this._pixelOffsetCache[t];if(-1!==i)return i;var o=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,n)}},{key:"_actualReadPixelOffset",value:function(e,t,n){if(0===this._characterMapping.length){var r=q.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return r&&0!==r.length?r[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(t-1),o=Y.a.getPartIndex(i),a=Y.a.getCharIndex(i),s=q.readHorizontalRanges(this._getReadingTarget(e),o,a,o,a,n.clientRectDeltaLeft,n.endNode);if(!s||0===s.length)return-1;var l=s[0].left;if(this.input.isBasicASCII){var c=this._characterMapping.getAbsoluteOffsets(),u=Math.round(this.input.spaceWidth*c[t-1]);if(Math.abs(u-l)<=1)return u}return l}},{key:"_readRawVisibleRangesForRange",value:function(e,t,n,r){if(1===t&&n===this._characterMapping.length)return[new z(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(t-1),o=Y.a.getPartIndex(i),a=Y.a.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(n-1),l=Y.a.getPartIndex(s),c=Y.a.getCharIndex(s);return q.readHorizontalRanges(this._getReadingTarget(e),o,a,l,c,r.clientRectDeltaLeft,r.endNode)}},{key:"getColumnOfNodeOffset",value:function(e,t,n){for(var r=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,r,n)+1}}]),e}(),oe=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_readVisibleRangesForRange",value:function(e,t,r,i){var o=Object(a.a)(Object(s.a)(n.prototype),"_readVisibleRangesForRange",this).call(this,e,t,r,i);if(!o||0===o.length||t===r||1===t&&r===this._characterMapping.length)return o;if(!this.input.containsRTL){var l=this._readPixelOffset(e,r,i);if(-1!==l){var c=o[o.length-1];c.left2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;Object(u.a)(this,e),this.element=t,this.type=n,this.mouseColumn=r,this.position=i,!o&&i&&(o=new ue.a(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=o,this.detail=a}return Object(d.a)(e,[{key:"toString",value:function(){return e.toString(this)}}],[{key:"_typeToString",value:function(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"}},{key:"toString",value:function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}}]),e}(),pe=function(){function e(){Object(u.a)(this,e)}return Object(d.a)(e,null,[{key:"isTextArea",value:function(e){return 2===e.length&&3===e[0]&&6===e[1]}},{key:"isChildOfViewLines",value:function(e){return e.length>=4&&3===e[0]&&7===e[3]}},{key:"isStrictChildOfViewLines",value:function(e){return e.length>4&&3===e[0]&&7===e[3]}},{key:"isChildOfScrollableElement",value:function(e){return e.length>=2&&3===e[0]&&5===e[1]}},{key:"isChildOfMinimap",value:function(e){return e.length>=2&&3===e[0]&&8===e[1]}},{key:"isChildOfContentWidgets",value:function(e){return e.length>=4&&3===e[0]&&1===e[3]}},{key:"isChildOfOverflowingContentWidgets",value:function(e){return e.length>=1&&2===e[0]}},{key:"isChildOfOverlayWidgets",value:function(e){return e.length>=2&&3===e[0]&&4===e[1]}}]),e}(),ge=function(){function e(t,n,r){Object(u.a)(this,e),this.model=t.model;var i=t.configuration.options;this.layoutInfo=i.get(117),this.viewDomNode=n.viewDomNode,this.lineHeight=i.get(51),this.typicalHalfwidthCharacterWidth=i.get(36).typicalHalfwidthCharacterWidth,this.lastRenderData=r,this._context=t,this._viewHelper=n}return Object(d.a)(e,[{key:"getZoneAtCoord",value:function(t){return e.getZoneAtCoord(this._context,t)}},{key:"getFullLineRangeAtCoord",value:function(e){if(this._context.viewLayout.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new ue.a(t,n,t,n),isAfterLines:!0}}var r=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(r);return{range:new ue.a(r,1,r,i),isAfterLines:!1}}},{key:"getLineNumberAtVerticalOffset",value:function(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}},{key:"isAfterLines",value:function(e){return this._context.viewLayout.isAfterLines(e)}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}},{key:"findAttribute",value:function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)}},{key:"getLineWidth",value:function(e){return this._viewHelper.getLineWidth(e)}},{key:"visibleRangeForPosition",value:function(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}},{key:"getPositionFromDOMInfo",value:function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}},{key:"getCurrentScrollTop",value:function(){return this._context.viewLayout.getCurrentScrollTop()}},{key:"getCurrentScrollLeft",value:function(){return this._context.viewLayout.getCurrentScrollLeft()}}],[{key:"getZoneAtCoord",value:function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var r,i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),a=null,s=null;return n.afterLineNumber!==o&&(s=new ce.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(a=new ce.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),r=null===s?a:null===a?s:t1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.mouseColumn;return t&&t.column=t.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,be._getMouseColumn(this.mouseContentHorizontalOffset,t.typicalHalfwidthCharacterWidth))})),ve={isAfterLines:!0};function _e(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var be=function(){function e(t,n){Object(u.a)(this,e),this._context=t,this._viewHelper=n}return Object(d.a)(e,[{key:"mouseTargetIsWidget",value:function(e){var t=e.target,n=B.collect(t,this._viewHelper.viewDomNode);return!(!pe.isChildOfContentWidgets(n)&&!pe.isChildOfOverflowingContentWidgets(n))||!!pe.isChildOfOverlayWidgets(n)}},{key:"createMouseTarget",value:function(t,n,r,i){var o=new ge(this._context,this._viewHelper,t),a=new me(o,n,r,i);try{return e._createMouseTarget(o,a,!1)}catch(s){return a.fulfill(0)}}},{key:"getMouseColumn",value:function(t,n){var r=this._context.configuration.options,i=r.get(117),o=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,r.get(36).typicalHalfwidthCharacterWidth)}}],[{key:"_createMouseTarget",value:function(t,n,r){if(null===n.target){if(r)return n.fulfill(0);var i=e._doHitTest(t,n);return i.position?e.createMouseTargetFromHitTestPosition(t,n,i.position.lineNumber,i.position.column):this._createMouseTarget(t,n.withTarget(i.hitTarget),!0)}var o=n,a=null;return(a=(a=(a=(a=(a=(a=(a=(a=(a=(a=a||e._hitTestContentWidget(t,o))||e._hitTestOverlayWidget(t,o))||e._hitTestMinimap(t,o))||e._hitTestScrollbarSlider(t,o))||e._hitTestViewZone(t,o))||e._hitTestMargin(t,o))||e._hitTestViewCursor(t,o))||e._hitTestTextArea(t,o))||e._hitTestViewLines(t,o,r))||e._hitTestScrollbar(t,o))||n.fulfill(0)}},{key:"_hitTestContentWidget",value:function(e,t){if(pe.isChildOfContentWidgets(t.targetPath)||pe.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null}},{key:"_hitTestOverlayWidget",value:function(e,t){if(pe.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null}},{key:"_hitTestViewCursor",value:function(e,t){if(t.target){var n,r=e.lastRenderData.lastViewCursorsRenderData,o=Object(i.a)(r);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(t.target===a.domNode)return t.fulfill(6,a.position)}}catch(p){o.e(p)}finally{o.f()}}if(t.isInContentArea){var s,l=e.lastRenderData.lastViewCursorsRenderData,c=t.mouseContentHorizontalOffset,u=t.mouseVerticalOffset,d=Object(i.a)(l);try{for(d.s();!(s=d.n()).done;){var h=s.value;if(!(ch.contentLeft+h.width)){var f=e.getVerticalOffsetForLineNumber(h.position.lineNumber);if(f<=u&&u<=f+h.height)return t.fulfill(6,h.position)}}}catch(p){d.e(p)}finally{d.f()}}return null}},{key:"_hitTestViewZone",value:function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var r=t.isInContentArea?8:5;return t.fulfill(r,n.position,null,n)}return null}},{key:"_hitTestTextArea",value:function(e,t){return pe.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}},{key:"_hitTestMargin",value:function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),r=n.range.getStartPosition(),i=Math.abs(t.pos.x-t.editorPos.x),o={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:i};return(i-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,r,n.range,o):(i-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,r,n.range,o):(i-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,r,n.range,o))}return null}},{key:"_hitTestViewLines",value:function(t,n,r){if(!pe.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var i=t.model.getLineCount(),o=t.model.getLineMaxColumn(i);return n.fulfill(7,new ce.a(i,o),void 0,ve)}if(r){if(pe.isStrictChildOfViewLines(n.targetPath)){var a=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(a)){var s=t.getLineWidth(a),l=_e(n.mouseContentHorizontalOffset-s);return n.fulfill(7,new ce.a(a,1),void 0,l)}var c=t.getLineWidth(a);if(n.mouseContentHorizontalOffset>=c){var u=_e(n.mouseContentHorizontalOffset-c),d=new ce.a(a,t.model.getLineMaxColumn(a));return n.fulfill(7,d,void 0,u)}}return n.fulfill(0)}var h=e._doHitTest(t,n);return h.position?e.createMouseTargetFromHitTestPosition(t,n,h.position.lineNumber,h.position.column):this._createMouseTarget(t,n.withTarget(h.hitTarget),!0)}},{key:"_hitTestMinimap",value:function(e,t){if(pe.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(11,new ce.a(n,r))}return null}},{key:"_hitTestScrollbarSlider",value:function(e,t){if(pe.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(r);return t.fulfill(11,new ce.a(r,i))}}return null}},{key:"_hitTestScrollbar",value:function(e,t){if(pe.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(11,new ce.a(n,r))}return null}},{key:"_getMouseColumn",value:function(e,t){return e<0?1:Math.round(e/t)+1}},{key:"createMouseTargetFromHitTestPosition",value:function(e,t,n,r){var i=new ce.a(n,r),o=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>o){if(T.f&&1===i.column){var a=_e(t.mouseContentHorizontalOffset-o);return t.fulfill(7,new ce.a(n,e.model.getLineMaxColumn(n)),void 0,a)}var s=_e(t.mouseContentHorizontalOffset-o);return t.fulfill(7,i,void 0,s)}var l=e.visibleRangeForPosition(n,r);if(!l)return t.fulfill(0,i);var c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfill(6,i);var u=[];if(u.push({offset:l.left,column:r}),r>1){var d=e.visibleRangeForPosition(n,r-1);d&&u.push({offset:d.left,column:r-1})}if(r=t.editorPos.y+e.layoutInfo.height&&(i=t.editorPos.y+e.layoutInfo.height-1);var o=new N(t.pos.x,i),a=this._actualDoHitTestWithCaretRangeFromPoint(e,o.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}},{key:"_actualDoHitTestWithCaretRangeFromPoint",value:function(e,t){var n,r=f.getShadowRoot(e.viewDomNode);if(!(n=r?"undefined"===typeof r.caretRangeFromPoint?function(e,t,n){var r=document.createRange(),i=e.elementFromPoint(t,n);if(null!==i){for(;i&&i.firstChild&&i.firstChild.nodeType!==i.firstChild.TEXT_NODE;)i=i.lastChild;var o,a=i.getBoundingClientRect(),s=window.getComputedStyle(i,null).getPropertyValue("font"),l=i.innerText,c=a.left,u=0;if(t>a.left+a.width)u=l.length;else for(var d=ye.getInstance(),h=0;h0?1:-1;Se.a.setZoomLevel(n+r),t.preventDefault(),t.stopPropagation()}}}),{capture:!0,passive:!1})),a._context.addEventHandler(Object(o.a)(a)),a}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onCursorStateChanged",value:function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}},{key:"onFocusChanged",value:function(e){return!1}},{key:"onScrollChanged",value:function(e){return this._mouseDownOperation.onScrollChanged(),!1}},{key:"getTargetAtClientPoint",value:function(e,t){var n=new D(e,t).toPageCoordinates(),r=A(this.viewHelper.viewDomNode);return n.yr.y+r.height||n.xr.x+r.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,n,null)}},{key:"_createMouseTarget",value:function(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}},{key:"_getMouseColumn",value:function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}},{key:"_onContextMenu",value:function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}},{key:"_onMouseMove",value:function(e){this._mouseDownOperation.isActive()||(e.timestampt.y+t.height){var c=r.getCurrentScrollTop()+(e.posy-t.y),u=ge.getZoneAtCoord(this._context,c);if(u){var d=this._helpPositionJumpOverViewZone(u);if(d)return new fe(null,13,i,d)}var h=r.getLineNumberAtVerticalOffset(c);return new fe(null,13,i,new ce.a(h,n.getLineMaxColumn(h)))}var f=r.getLineNumberAtVerticalOffset(r.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new fe(null,13,i,new ce.a(f,n.getLineMaxColumn(f))):null}},{key:"_findMousePosition",value:function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var r=this._createMouseTarget(e,t);if(!r.position)return null;if(8===r.type||5===r.type){var i=this._helpPositionJumpOverViewZone(r.detail);if(i)return new fe(r.element,r.type,r.mouseColumn,i,null,r.detail)}return r}},{key:"_helpPositionJumpOverViewZone",value:function(e){var t=new ce.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,r=e.positionAfter;return n&&r?n.isBefore(t)?n:r:null}},{key:"_dispatchMouse",value:function(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})}}]),n}(m.a),we=function(){function e(){Object(u.a)(this,e),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}return Object(d.a)(e,[{key:"setModifiers",value:function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}},{key:"setStartButtons",value:function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}},{key:"setStartedOnLineNumbers",value:function(e){this._startedOnLineNumbers=e}},{key:"trySetCount",value:function(t,n){var r=(new Date).getTime();r-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=r,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)}},{key:"altKey",get:function(){return this._altKey}},{key:"ctrlKey",get:function(){return this._ctrlKey}},{key:"metaKey",get:function(){return this._metaKey}},{key:"shiftKey",get:function(){return this._shiftKey}},{key:"leftButton",get:function(){return this._leftButton}},{key:"middleButton",get:function(){return this._middleButton}},{key:"startedOnLineNumbers",get:function(){return this._startedOnLineNumbers}},{key:"count",get:function(){return this._lastMouseDownCount}}]),e}();we.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Oe=n(152);function Te(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var xe=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var o;return Object(u.a)(this,n),(o=t.call(this,e,r,i)).viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout((function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var r=n.pointerType;"mouse"!==r?"touch"===r?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse"})),o._register(f.addDisposableThrottledListener(o.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return o._onGestureChange(e)}),Te)),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return o._onCaptureGestureTap(e)}),!0))}}),100),o._lastPointerType="mouse",o}return Object(d.a)(n,[{key:"_onMouseDown",value:function(e){"mouse"===this._lastPointerType&&Object(a.a)(Object(s.a)(n.prototype),"_onMouseDown",this).call(this,e)}},{key:"_onCaptureGestureTap",value:function(e){var t=this,n=new I(e,this.viewHelper.viewDomNode),r=this._createMouseTarget(n,!1);r.position&&this.viewController.moveTo(r.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))}},{key:"_onGestureChange",value:function(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}},{key:"dispose",value:function(){window.clearTimeout(this._installGestureHandlerTimeout),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}}]),n}(ke),Ne=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var o;Object(u.a)(this,n),(o=t.call(this,e,r,i))._register(E.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Tap,(function(e){return o.onTap(e)}))),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Change,(function(e){return o.onChange(e)}))),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Contextmenu,(function(e){return o._onContextMenu(new I(e,o.viewHelper.viewDomNode),!1)}))),o._lastPointerType="mouse",o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;o._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var a=new M(o.viewHelper.viewDomNode);return o._register(a.onPointerMoveThrottled(o.viewHelper.viewDomNode,(function(e){return o._onMouseMove(e)}),Ce(o.mouseTargetFactory),ke.MOUSE_MOVE_MINIMUM_TIME)),o._register(a.onPointerUp(o.viewHelper.viewDomNode,(function(e){return o._onMouseUp(e)}))),o._register(a.onPointerLeave(o.viewHelper.viewDomNode,(function(e){return o._onMouseLeave(e)}))),o._register(a.onPointerDown(o.viewHelper.viewDomNode,(function(e){return o._onMouseDown(e)}))),o}return Object(d.a)(n,[{key:"onTap",value:function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new I(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})}}},{key:"onChange",value:function(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}},{key:"_onMouseDown",value:function(e){e.target&&this.viewHelper.linesContentDomNode.contains(e.target)&&"touch"===this._lastPointerType||Object(a.a)(Object(s.a)(n.prototype),"_onMouseDown",this).call(this,e)}}]),n}(ke),De=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var o;return Object(u.a)(this,n),(o=t.call(this,e,r,i))._register(E.b.addTarget(o.viewHelper.linesContentDomNode)),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Tap,(function(e){return o.onTap(e)}))),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Change,(function(e){return o.onChange(e)}))),o._register(f.addDisposableListener(o.viewHelper.linesContentDomNode,E.a.Contextmenu,(function(e){return o._onContextMenu(new I(e,o.viewHelper.viewDomNode),!1)}))),o}return Object(d.a)(n,[{key:"onTap",value:function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new I(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)}},{key:"onChange",value:function(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}]),n}(ke),Le=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var o;return Object(u.a)(this,n),o=t.call(this),k.c&&Oe.a.pointerEvents?o.handler=o._register(new Ne(e,r,i)):window.TouchEvent?o.handler=o._register(new De(e,r,i)):window.navigator.pointerEnabled||window.PointerEvent?o.handler=o._register(new xe(e,r,i)):o.handler=o._register(new ke(e,r,i)),o}return Object(d.a)(n,[{key:"getTargetAtClientPoint",value:function(e,t){return this.handler.getTargetAtClientPoint(e,t)}}]),n}(m.a),Ae=(n(452),n(15)),Ie=n(198),Re=n(137),Me=(n(453),function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return n}(j)),Pe=n(66),je=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this))._context=e,r._readConfig(),r._lastCursorModelPosition=new ce.a(1,1),r._renderResult=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"_readConfig",value:function(){var e=this._context.configuration.options;this._lineHeight=e.get(51);var t=e.get(52);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(76);var n=e.get(117);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}},{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){return this._readConfig(),!0}},{key:"onCursorStateChanged",value:function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_getLineRenderLineNumber",value:function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ce.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var r=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===r?''+n+"":String(r)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}},{key:"prepareRender",value:function(e){if(0!==this._renderLineNumbers){for(var t=k.d?this._lineHeight%2===0?" lh-even":" lh-odd":"",r=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o='
',a=this._context.model.getLineCount(),s=[],l=r;l<=i;l++){var c=l-r;if(this._renderFinalNewline||l!==a||0!==this._context.model.getLineLength(l)){var u=this._getLineRenderLineNumber(l);s[c]=u?o+u+"
":""}else s[c]=""}this._renderResult=s}else this._renderResult=null}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Me);je.CLASS_NAME="line-numbers",Object($.g)((function(e,t){var n=e.getColor(Pe.k);n&&t.addRule(".monaco-editor .line-numbers { color: ".concat(n,"; }"));var r=e.getColor(Pe.b);r&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: ".concat(r,"; }"))}));var Fe=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options,o=i.get(117);return r._canUseLayerHinting=!i.get(23),r._contentLeft=o.contentLeft,r._glyphMarginLeft=o.glyphMarginLeft,r._glyphMarginWidth=o.glyphMarginWidth,r._domNode=Object(C.b)(document.createElement("div")),r._domNode.setClassName(n.OUTER_CLASS_NAME),r._domNode.setPosition("absolute"),r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true"),r._glyphMarginBackgroundDomNode=Object(C.b)(document.createElement("div")),r._glyphMarginBackgroundDomNode.setClassName(n.CLASS_NAME),r._domNode.appendChild(r._glyphMarginBackgroundDomNode),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(117);return this._canUseLayerHinting=!t.get(23),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}},{key:"onScrollChanged",value:function(e){return Object(a.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollTopChanged}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}]),n}(F);Fe.CLASS_NAME="glyph-margin",Fe.OUTER_CLASS_NAME="margin";var Be=n(123),Ue=n(159),He=function(){function e(t,n,r){Object(u.a)(this,e),this.top=t,this.left=n,this.width=r}return Object(d.a)(e,[{key:"setWidth",value:function(t){return new e(this.top,this.left,t)}}]),e}(),ze=T.f||T.h,Ve=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var o;Object(u.a)(this,n),(o=t.call(this,e))._primaryCursorPosition=new ce.a(1,1),o._primaryCursorVisibleRange=null,o._viewController=r,o._viewHelper=i,o._scrollLeft=0,o._scrollTop=0;var a=o._context.configuration.options,s=a.get(117);o._setAccessibilityOptions(a),o._contentLeft=s.contentLeft,o._contentWidth=s.contentWidth,o._contentHeight=s.height,o._fontInfo=a.get(36),o._lineHeight=a.get(51),o._emptySelectionClipboard=a.get(26),o._copyWithSyntaxHighlighting=a.get(16),o._visibleTextArea=null,o._selections=[new S.a(1,1,1,1)],o._modelSelections=[new S.a(1,1,1,1)],o._lastRenderPosition=null,o.textArea=Object(C.b)(document.createElement("textarea")),B.write(o.textArea,6),o.textArea.setClassName("inputarea ".concat(Ue.a)),o.textArea.setAttribute("wrap","off"),o.textArea.setAttribute("autocorrect","off"),o.textArea.setAttribute("autocapitalize","off"),o.textArea.setAttribute("autocomplete","off"),o.textArea.setAttribute("spellcheck","false"),o.textArea.setAttribute("aria-label",o._getAriaLabel(a)),o.textArea.setAttribute("tabindex",String(a.get(102))),o.textArea.setAttribute("role","textbox"),o.textArea.setAttribute("aria-roledescription",h.a("editor","editor")),o.textArea.setAttribute("aria-multiline","true"),o.textArea.setAttribute("aria-haspopup","false"),o.textArea.setAttribute("aria-autocomplete","both"),k.h&&a.get(72)&&o.textArea.setAttribute("readonly","true"),o.textAreaCover=Object(C.b)(document.createElement("div")),o.textAreaCover.setPosition("absolute");var l={getLineCount:function(){return o._context.model.getLineCount()},getLineMaxColumn:function(e){return o._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return o._context.model.getValueInRange(e,t)}},c={getDataToCopy:function(e){var t=o._context.model.getPlainTextToCopy(o._modelSelections,o._emptySelectionClipboard,k.i),n=o._context.model.getEOL(),r=o._emptySelectionClipboard&&1===o._modelSelections.length&&o._modelSelections[0].isEmpty(),i=Array.isArray(t)?t:null,a=Array.isArray(t)?t.join(n):t,s=void 0,l=null;if(e&&(Ie.a.forceCopyWithSyntaxHighlighting||o._copyWithSyntaxHighlighting&&a.length<65536)){var c=o._context.model.getRichTextToCopy(o._modelSelections,o._emptySelectionClipboard);c&&(s=c.html,l=c.mode)}return{isFromEmptySelection:r,multicursorText:i,text:a,html:s,mode:l}},getScreenReaderContent:function(e){if(1===o._accessibilitySupport){if(k.f){var t=o._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),r=o._getWordBeforePosition(n);if(0===r.length&&(r=o._getCharacterBeforePosition(n)),r.length>0)return new Re.b(r,r.length,r.length,n,n)}}return Re.b.EMPTY}return Re.a.fromEditorSelection(e,l,o._selections[0],o._accessibilityPageSize,0===o._accessibilitySupport)},deduceModelPosition:function(e,t,n){return o._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return o._textAreaInput=o._register(new Ie.c(c,o.textArea)),o._register(o._textAreaInput.onKeyDown((function(e){o._viewController.emitKeyDown(e)}))),o._register(o._textAreaInput.onKeyUp((function(e){o._viewController.emitKeyUp(e)}))),o._register(o._textAreaInput.onPaste((function(e){var t=!1,n=null,r=null;e.metadata&&(t=o._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,r=e.metadata.mode),o._viewController.paste(e.text,t,n,r)}))),o._register(o._textAreaInput.onCut((function(){o._viewController.cut()}))),o._register(o._textAreaInput.onType((function(e){e.replaceCharCnt?o._viewController.replacePreviousChar(e.text,e.replaceCharCnt):o._viewController.type(e.text)}))),o._register(o._textAreaInput.onSelectionChangeRequest((function(e){o._viewController.setSelection(e)}))),o._register(o._textAreaInput.onCompositionStart((function(e){var t=o._selections[0].startLineNumber,n=o._selections[0].startColumn-(e.moveOneCharacterLeft?1:0);o._context.model.revealRange("keyboard",!0,new ue.a(t,n,t,n),0,1);var r=o._viewHelper.visibleRangeForPositionRelativeToEditor(t,n);r&&(o._visibleTextArea=new He(o._context.viewLayout.getVerticalOffsetForLineNumber(t),r.left,ze?0:1),o._render()),o.textArea.setClassName("inputarea ".concat(Ue.a," ime-input")),o._viewController.compositionStart()}))),o._register(o._textAreaInput.onCompositionUpdate((function(e){T.f?o._visibleTextArea=o._visibleTextArea.setWidth(0):o._visibleTextArea=o._visibleTextArea.setWidth(function(e,t){var n=document.createElement("canvas").getContext("2d");n.font=function(e){return t="normal",n=e.fontWeight,r=e.fontSize,i=e.lineHeight,o=e.fontFamily,"".concat(t," normal ").concat(n," ").concat(r,"px / ").concat(i,"px ").concat(o);var t,n,r,i,o}(t);var r=n.measureText(e);return T.h?r.width+2:r.width}(e.data,o._fontInfo)),o._render()}))),o._register(o._textAreaInput.onCompositionEnd((function(){o._visibleTextArea=null,o._render(),o.textArea.setClassName("inputarea ".concat(Ue.a)),o._viewController.compositionEnd()}))),o._register(o._textAreaInput.onFocus((function(){o._context.model.setHasFocus(!0)}))),o._register(o._textAreaInput.onBlur((function(){o._context.model.setHasFocus(!1)}))),o}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_getWordBeforePosition",value:function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(Be.a)(this._context.configuration.options.get(105)),r=e.column,i=0;r>1;){var o=t.charCodeAt(r-2);if(0!==n.get(o)||i>50)return t.substring(r-1,e.column-1);i++,r--}return t.substring(0,e.column-1)}},{key:"_getCharacterBeforePosition",value:function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Ae.F(t.charCodeAt(0)))return t}return""}},{key:"_getAriaLabel",value:function(e){return 1===e.get(2)?h.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",k.d?"Shift+Alt+F1":"Alt+F1"):e.get(4)}},{key:"_setAccessibilityOptions",value:function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===Q.g.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(117);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.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))),k.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}},{key:"onCursorStateChanged",value:function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}},{key:"onZonesChanged",value:function(e){return!0}},{key:"isFocused",value:function(){return this._textAreaInput.isFocused()}},{key:"focusTextArea",value:function(){this._textAreaInput.focusTextArea()}},{key:"getLastRenderData",value:function(){return this._lastRenderPosition}},{key:"setAriaOptions",value:function(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)}},{key:"prepareRender",value:function(e){this._primaryCursorPosition=new ce.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}},{key:"render",value:function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}},{key:"_render",value:function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():k.f?this._renderInsideEditor(this._primaryCursorPosition,t,e,ze?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,ze?0:1,ze?0:1)}}else this._renderAtTopLeft()}},{key:"_renderInsideEditor",value:function(e,t,n,r,i){this._lastRenderPosition=e;var o=this.textArea,a=this.textAreaCover;_.a.applyFontInfo(o,this._fontInfo),o.setTop(t),o.setLeft(n),o.setWidth(r),o.setHeight(i),a.setTop(0),a.setLeft(0),a.setWidth(0),a.setHeight(0)}},{key:"_renderAtTopLeft",value:function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(_.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),ze)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);var n=this._context.configuration.options;n.get(42)?t.setClassName("monaco-editor-background textAreaCover "+Fe.OUTER_CLASS_NAME):0!==n.get(52).renderType?t.setClassName("monaco-editor-background textAreaCover "+je.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}]),n}(F);var We=n(112),Ge=function(){function e(t,n,r,i){Object(u.a)(this,e),this.configuration=t,this.viewModel=n,this.userInputEvents=r,this.commandDelegate=i}return Object(d.a)(e,[{key:"paste",value:function(e,t,n,r){this.commandDelegate.paste(e,t,n,r)}},{key:"type",value:function(e){this.commandDelegate.type(e)}},{key:"replacePreviousChar",value:function(e,t){this.commandDelegate.replacePreviousChar(e,t)}},{key:"compositionStart",value:function(){this.commandDelegate.startComposition()}},{key:"compositionEnd",value:function(){this.commandDelegate.endComposition()}},{key:"cut",value:function(){this.commandDelegate.cut()}},{key:"setSelection",value:function(e){We.b.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}},{key:"_validateViewColumn",value:function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=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||r?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}},{key:"_usualArgs",value:function(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}},{key:"moveTo",value:function(e){We.b.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_moveToSelect",value:function(e){We.b.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_columnSelect",value:function(e,t,n){e=this._validateViewColumn(e),We.b.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}},{key:"_createCursor",value:function(e,t){e=this._validateViewColumn(e),We.b.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}},{key:"_lastCursorMoveToSelect",value:function(e){We.b.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_wordSelect",value:function(e){We.b.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_wordSelectDrag",value:function(e){We.b.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorWordSelect",value:function(e){We.b.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lineSelect",value:function(e){We.b.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lineSelectDrag",value:function(e){We.b.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorLineSelect",value:function(e){We.b.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorLineSelectDrag",value:function(e){We.b.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_selectAll",value:function(){We.b.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}},{key:"_convertViewToModelPosition",value:function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}},{key:"emitKeyDown",value:function(e){this.userInputEvents.emitKeyDown(e)}},{key:"emitKeyUp",value:function(e){this.userInputEvents.emitKeyUp(e)}},{key:"emitContextMenu",value:function(e){this.userInputEvents.emitContextMenu(e)}},{key:"emitMouseMove",value:function(e){this.userInputEvents.emitMouseMove(e)}},{key:"emitMouseLeave",value:function(e){this.userInputEvents.emitMouseLeave(e)}},{key:"emitMouseUp",value:function(e){this.userInputEvents.emitMouseUp(e)}},{key:"emitMouseDown",value:function(e){this.userInputEvents.emitMouseDown(e)}},{key:"emitMouseDrag",value:function(e){this.userInputEvents.emitMouseDrag(e)}},{key:"emitMouseDrop",value:function(e){this.userInputEvents.emitMouseDrop(e)}},{key:"emitMouseWheel",value:function(e){this.userInputEvents.emitMouseWheel(e)}}]),e}(),qe=function(){function e(t){Object(u.a)(this,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=t}return Object(d.a)(e,[{key:"emitKeyDown",value:function(e){this.onKeyDown&&this.onKeyDown(e)}},{key:"emitKeyUp",value:function(e){this.onKeyUp&&this.onKeyUp(e)}},{key:"emitContextMenu",value:function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseMove",value:function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseLeave",value:function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDown",value:function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseUp",value:function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDrag",value:function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDrop",value:function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseWheel",value:function(e){this.onMouseWheel&&this.onMouseWheel(e)}},{key:"_convertViewToModelMouseEvent",value:function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}},{key:"_convertViewToModelMouseTarget",value:function(t){return e.convertViewToModelMouseTarget(t,this._coordinatesConverter)}}],[{key:"convertViewToModelMouseTarget",value:function(e,t){return new Ke(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}]),e}(),Ke=function(){function e(t,n,r,i,o,a){Object(u.a)(this,e),this.element=t,this.type=n,this.mouseColumn=r,this.position=i,this.range=o,this.detail=a}return Object(d.a)(e,[{key:"toString",value:function(){return fe.toString(this)}}]),e}(),Ye=n(144),$e=function(){function e(t){Object(u.a)(this,e),this._createLine=t,this._set(1,[])}return Object(d.a)(e,[{key:"flush",value:function(){this._set(1,[])}},{key:"_set",value:function(e,t){this._lines=t,this._rendLineNumberStart=e}},{key:"_get",value:function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}},{key:"getStartLineNumber",value:function(){return this._rendLineNumberStart}},{key:"getEndLineNumber",value:function(){return this._rendLineNumberStart+this._lines.length-1}},{key:"getCount",value:function(){return this._lines.length}},{key:"getLine",value:function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}},{key:"onLinesDeleted",value:function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),r=this.getEndLineNumber();if(tr)return null;for(var o=0,a=0,s=n;s<=r;s++){var l=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===a?(o=l,a=1):a++)}if(e=n&&o<=r&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),i=!0);return i}},{key:"onLinesInserted",value:function(e,t){if(0===this.getCount())return null;var n=t-e+1,r=this.getStartLineNumber(),i=this.getEndLineNumber();if(e<=r)return this._rendLineNumberStart+=n,null;if(e>i)return null;if(n+e>i)return this._lines.splice(e-this._rendLineNumberStart,i-e+1);for(var o=[],a=0;an))for(var s=Math.max(t,a.fromLineNumber),l=Math.min(n,a.toLineNumber),c=s;c<=l;c++){var u=c-this._rendLineNumberStart;this._lines[u].onTokensChanged(),r=!0}}return r}}]),e}(),Qe=function(){function e(t){var n=this;Object(u.a)(this,e),this._host=t,this.domNode=this._createDomNode(),this._linesCollection=new $e((function(){return n._host.createVisibleLine()}))}return Object(d.a)(e,[{key:"_createDomNode",value:function(){var e=Object(C.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}},{key:"onConfigurationChanged",value:function(e){return!!e.hasChanged(117)}},{key:"onFlushed",value:function(e){return this._linesCollection.flush(),!0}},{key:"onLinesChanged",value:function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}},{key:"onLinesDeleted",value:function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,r=t.length;nt){var a=t,s=Math.min(n,i.rendLineNumberStart-1);a<=s&&(this._insertLinesBefore(i,a,s,r,t),i.linesLength+=s-a+1)}else if(i.rendLineNumberStart0&&(this._removeLinesBefore(i,l),i.linesLength-=l)}if(i.rendLineNumberStart=t,i.rendLineNumberStart+i.linesLength-1n){var d=Math.max(0,n-i.rendLineNumberStart+1),h=i.linesLength-1-d+1;h>0&&(this._removeLinesAfter(i,h),i.linesLength-=h)}return this._finishRendering(i,!1,r),i}},{key:"_renderUntouchedLines",value:function(e,t,n,r,i){for(var o=e.rendLineNumberStart,a=e.lines,s=t;s<=n;s++){var l=o+s;a[s].layoutLine(l,r[l-i])}}},{key:"_insertLinesBefore",value:function(e,t,n,r,i){for(var o=[],a=0,s=t;s<=n;s++)o[a++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}},{key:"_removeLinesBefore",value:function(e,t){for(var n=0;n=0;a--){var s=e.lines[a];r[a]&&(s.setDomNode(o),o=o.previousSibling)}}},{key:"_finishRenderingInvalidLines",value:function(e,t,n){var r=document.createElement("div");r.innerHTML=t;for(var i=0;i'),r.appendASCIIString(i),r.appendASCIIString(""),!0)}},{key:"layoutLine",value:function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}]),e}(),et=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options.get(117);return r._contentWidth=i.contentWidth,r.domNode.setHeight(0),r}return Object(d.a)(n,[{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(117);return this._contentWidth=t.contentWidth,Object(a.a)(Object(s.a)(n.prototype),"onConfigurationChanged",this).call(this,e)||!0}},{key:"onScrollChanged",value:function(e){return Object(a.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollWidthChanged}},{key:"_viewOverlaysRender",value:function(e){Object(a.a)(Object(s.a)(n.prototype),"_viewOverlaysRender",this).call(this,e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}]),n}(Xe),tt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options,o=i.get(117);return r._contentLeft=o.contentLeft,r.domNode.setClassName("margin-view-overlays"),r.domNode.setWidth(1),_.a.applyFontInfo(r.domNode,i.get(36)),r}return Object(d.a)(n,[{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;_.a.applyFontInfo(this.domNode,t.get(36));var r=t.get(117);return this._contentLeft=r.contentLeft,Object(a.a)(Object(s.a)(n.prototype),"onConfigurationChanged",this).call(this,e)||!0}},{key:"onScrollChanged",value:function(e){return Object(a.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollHeightChanged}},{key:"_viewOverlaysRender",value:function(e){Object(a.a)(Object(s.a)(n.prototype),"_viewOverlaysRender",this).call(this,e);var t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}]),n}(Xe),nt=function e(t,n){Object(u.a)(this,e),this.top=t,this.left=n},rt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;return Object(u.a)(this,n),(i=t.call(this,e))._viewDomNode=r,i._widgets={},i.domNode=Object(C.b)(document.createElement("div")),B.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object(C.b)(document.createElement("div")),B.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._widgets={}}},{key:"onConfigurationChanged",value:function(e){for(var t=0,n=Object.keys(this._widgets);t=r,u=s,d=i.viewportHeight-s>=r,h=e.left,f=t.left;return h+n>i.scrollLeft+i.viewportWidth&&(h=i.scrollLeft+i.viewportWidth-n),f+n>i.scrollLeft+i.viewportWidth&&(f=i.scrollLeft+i.viewportWidth-n),ho){var s=a-(o-r);a-=s,n-=s}if(a=22,C=u+i<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:S,aboveTop:Math.max(c,22),aboveLeft:m,fitsBelow:C,belowTop:u,belowLeft:y}:{fitsAbove:S,aboveTop:a,aboveLeft:g,fitsBelow:C,belowTop:s,belowLeft:b}}},{key:"_prepareRenderWidgetAtExactPositionOverflowing",value:function(e){return new nt(e.top,e.left+this._contentLeft)}},{key:"_getTopAndBottomLeft",value:function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];var n,r=t[0],o=t[0],a=Object(i.a)(t);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.lineNumbero.lineNumber&&(o=s)}}catch(b){a.e(b)}finally{a.f()}var l,c=1073741824,u=Object(i.a)(r.ranges);try{for(u.s();!(l=u.n()).done;){var d=l.value;d.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}},{key:"prepareRender",value:function(e){this._renderData=this._prepareRenderWidget(e)}},{key:"render",value:function(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"))}}]),e}(),ot=(n(455),n(24)),at=!0,st=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this))._context=e;var i=r._context.configuration.options,a=i.get(117);return r._lineHeight=i.get(51),r._renderLineHighlight=i.get(77),r._renderLineHightlightOnlyWhenFocus=i.get(78),r._contentLeft=a.contentLeft,r._contentWidth=a.contentWidth,r._selectionIsEmpty=!0,r._focused=!1,r._cursorLineNumbers=[],r._selections=[],r._renderData=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_readFromSelections",value:function(){var e=!1,t=at?this._selections.slice(0,1):this._selections,n=t.map((function(e){return e.positionLineNumber}));n.sort((function(e,t){return e-t})),ot.g(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,e=!0);var r=t.every((function(e){return e.isEmpty()}));return this._selectionIsEmpty!==r&&(this._selectionIsEmpty=r,e=!0),e}},{key:"onThemeChanged",value:function(e){return this._readFromSelections()}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(117);return this._lineHeight=t.get(51),this._renderLineHighlight=t.get(77),this._renderLineHightlightOnlyWhenFocus=t.get(78),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,!0}},{key:"onCursorStateChanged",value:function(e){return this._selections=e.selections,this._readFromSelections()}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollWidthChanged||e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"onFocusChanged",value:function(e){return!!this._renderLineHightlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}},{key:"prepareRender",value:function(e){if(this._shouldRenderThis()){for(var t=this._renderOne(e),n=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,i=this._cursorLineNumbers.length,o=0,a=[],s=n;s<=r;s++){for(var l=s-n;o=this._renderData.length?"":this._renderData[n]}}]),n}(Me),lt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_renderOne",value:function(e){var t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return'
')}},{key:"_shouldRenderThis",value:function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}},{key:"_shouldRenderOther",value:function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}]),n}(st),ct=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_renderOne",value:function(e){var t="current-line current-line-margin"+(this._shouldRenderOther()?" current-line-margin-both":"");return'
')}},{key:"_shouldRenderThis",value:function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}},{key:"_shouldRenderOther",value:function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHightlightOnlyWhenFocus||this._focused)}}]),n}(st);Object($.g)((function(e,t){at=!1;var n=e.getColor(Pe.i);if(n&&(t.addRule(".monaco-editor .view-overlays .current-line { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: ".concat(n,"; border: none; }"))),!n||n.isTransparent()||e.defines(Pe.j)){var r=e.getColor(Pe.j);r&&(at=!0,t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid ".concat(r,"; }")),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ".concat(r,"; }")),"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; }")))}}));n(456);var ut=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this))._context=e;var i=r._context.configuration.options;return r._lineHeight=i.get(51),r._typicalHalfwidthCharacterWidth=i.get(36).typicalHalfwidthCharacterWidth,r._renderResult=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged||e.scrollWidthChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"prepareRender",value:function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,i=0,o=t.length;it.options.zIndex)return 1;var n=e.options.className,r=t.options.className;return nr?1:ue.a.compareRangesUsingStarts(e.range,t.range)}));for(var s=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],u=s;u<=l;u++){c[u-s]=""}this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c}},{key:"_renderWholeLineDecorations",value:function(e,t,n){for(var r=String(this._lineHeight),i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,a=0,s=t.length;a',u=Math.max(l.range.startLineNumber,i),d=Math.min(l.range.endLineNumber,o),h=u;h<=d;h++){n[h-i]+=c}}}},{key:"_renderNormalDecorations",value:function(e,t,n){for(var r=String(this._lineHeight),i=e.visibleRange.startLineNumber,o=null,a=!1,s=null,l=0,c=t.length;l';a[d]+=m}}}}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Me),dt=n(109),ht=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,o){var a;Object(u.a)(this,n);var s=(a=t.call(this,e))._context.configuration.options,l=s.get(84),c=s.get(58),d=s.get(28),h=s.get(87),p={listenOnDomNode:i.domNode,className:"editor-scrollable "+Object($.f)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:l.vertical,horizontal:l.horizontal,verticalHasArrows:l.verticalHasArrows,horizontalHasArrows:l.horizontalHasArrows,verticalScrollbarSize:l.verticalScrollbarSize,verticalSliderSize:l.verticalSliderSize,horizontalScrollbarSize:l.horizontalScrollbarSize,horizontalSliderSize:l.horizontalSliderSize,handleMouseWheel:l.handleMouseWheel,alwaysConsumeMouseWheel:l.alwaysConsumeMouseWheel,arrowSize:l.arrowSize,mouseWheelScrollSensitivity:c,fastScrollSensitivity:d,scrollPredominantAxis:h};a.scrollbar=a._register(new dt.c(r.domNode,p,a._context.viewLayout.getScrollable())),B.write(a.scrollbar.getDomNode(),5),a.scrollbarDomNode=Object(C.b)(a.scrollbar.getDomNode()),a.scrollbarDomNode.setPosition("absolute"),a._setLayout();var g=function(e,t,n){var r={};if(t){var i=e.scrollTop;i&&(r.scrollTop=a._context.viewLayout.getCurrentScrollTop()+i,e.scrollTop=0)}if(n){var o=e.scrollLeft;o&&(r.scrollLeft=a._context.viewLayout.getCurrentScrollLeft()+o,e.scrollLeft=0)}a._context.model.setScrollPosition(r,1)};return a._register(f.addDisposableListener(i.domNode,"scroll",(function(e){return g(i.domNode,!0,!0)}))),a._register(f.addDisposableListener(r.domNode,"scroll",(function(e){return g(r.domNode,!0,!1)}))),a._register(f.addDisposableListener(o.domNode,"scroll",(function(e){return g(o.domNode,!0,!1)}))),a._register(f.addDisposableListener(a.scrollbarDomNode.domNode,"scroll",(function(e){return g(a.scrollbarDomNode.domNode,!0,!1)}))),a}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_setLayout",value:function(){var e=this._context.configuration.options,t=e.get(117);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(56).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}},{key:"getOverviewRulerLayoutInfo",value:function(){return this.scrollbar.getOverviewRulerLayoutInfo()}},{key:"getDomNode",value:function(){return this.scrollbarDomNode}},{key:"delegateVerticalScrollbarMouseDown",value:function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}},{key:"onConfigurationChanged",value:function(e){if(e.hasChanged(84)||e.hasChanged(58)||e.hasChanged(28)){var t=this._context.configuration.options,n=t.get(84),r=t.get(58),i=t.get(28),o=t.get(87),a={handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:r,fastScrollSensitivity:i,scrollPredominantAxis:o};this.scrollbar.updateOptions(a)}return e.hasChanged(117)&&this._setLayout(),!0}},{key:"onScrollChanged",value:function(e){return!0}},{key:"onThemeChanged",value:function(e){return this.scrollbar.updateClassName("editor-scrollable "+Object($.f)(this._context.theme.type)),!0}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this.scrollbar.renderNow()}}]),n}(F),ft=(n(458),function e(t,n,r){Object(u.a)(this,e),this.startLineNumber=+t,this.endLineNumber=+n,this.className=String(r)}),pt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_render",value:function(e,t,n){for(var r=[],i=e;i<=t;i++){r[i-e]=[]}if(0===n.length)return r;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',a=[],s=t;s<=n;s++){var l=s-t,c=r[l];0===c.length?a[l]="":a[l]='
=this._renderResult.length?"":this._renderResult[n]}}]),n}(pt),mt=(n(459),function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this))._context=e,r._primaryLineNumber=0;var i=r._context.configuration.options,a=i.get(118),s=i.get(36);return r._lineHeight=i.get(51),r._spaceWidth=s.spaceWidth,r._enabled=i.get(75),r._activeIndentEnabled=i.get(45),r._maxIndentLeft=-1===a.wrappingColumn?-1:a.wrappingColumn*s.typicalHalfwidthCharacterWidth,r._renderResult=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(118),r=t.get(36);return this._lineHeight=t.get(51),this._spaceWidth=r.spaceWidth,this._enabled=t.get(75),this._activeIndentEnabled=t.get(45),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*r.typicalHalfwidthCharacterWidth,!0}},{key:"onCursorStateChanged",value:function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"onLanguageConfigurationChanged",value:function(e){return!0}},{key:"prepareRender",value:function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r=this._context.model.getTextModelOptions().indentSize*this._spaceWidth,i=e.scrollWidth,o=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,n),s=0,l=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var u=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);s=u.startLineNumber,l=u.endLineNumber,c=u.indent}for(var d=[],h=t;h<=n;h++){var f=s<=h&&h<=l,p=h-t,g=a[p],m="";if(g>=1)for(var v=e.visibleRangeForPosition(new ce.a(h,1)),_=v?v.left:0,b=1;b<=g;b++){if(m+='
'),(_+=r)>i||this._maxIndentLeft>0&&_>this._maxIndentLeft)break}d[p]=m}this._renderResult=d}else this._renderResult=null}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Me));Object($.g)((function(e,t){var n=e.getColor(Pe.h);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ".concat(n," inset; }"));var r=e.getColor(Pe.a)||n;r&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ".concat(r," inset; }"))}));n(460);var vt=function(){function e(){Object(u.a)(this,e),this._currentVisibleRange=new ue.a(1,1,1,1)}return Object(d.a)(e,[{key:"getCurrentVisibleRange",value:function(){return this._currentVisibleRange}},{key:"setCurrentVisibleRange",value:function(e){this._currentVisibleRange=e}}]),e}(),_t=function e(t,n,r,i,o,a){Object(u.a)(this,e),this.lineNumber=t,this.startColumn=n,this.endColumn=r,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=a,this.type="range",this.minLineNumber=t,this.maxLineNumber=t},bt=function e(t,n,r,i){Object(u.a)(this,e),this.selections=t,this.startScrollTop=n,this.stopScrollTop=r,this.scrollType=i,this.type="selections";for(var o=t[0].startLineNumber,a=t[0].endLineNumber,s=1,l=t.length;s0&&(this._horizontalRevealRequest=new bt(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;var r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,r),!0}},{key:"onScrollChanged",value:function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}},{key:"onTokensChanged",value:function(e){return this._visibleLines.onTokensChanged(e)}},{key:"onZonesChanged",value:function(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}},{key:"onThemeChanged",value:function(e){return this._onOptionsMaybeChanged()}},{key:"getPositionFromDOMInfo",value:function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var r=this._getLineNumberFor(n);if(-1===r)return null;if(r<1||r>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(r))return new ce.a(r,1);var i=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(ro)return null;var a=this._visibleLines.getVisibleLine(r).getColumnOfNodeOffset(r,e,t),s=this._context.model.getLineMinColumn(r);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()}},{key:"linesVisibleRangesForRange",value:function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,r=ue.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!r)return null;var i=[],o=0,a=new ee(this.domNode.domNode,this._textRangeRestingSpot),s=0;t&&(s=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ce.a(r.startLineNumber,1)).lineNumber);for(var l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),u=r.startLineNumber;u<=r.endLineNumber;u++)if(!(uc)){var d=u===r.startLineNumber?r.startColumn:1,h=u===r.endLineNumber?r.endColumn:this._context.model.getLineMaxColumn(u),f=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(d,h,a);if(f){if(t&&uthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new ee(this.domNode.domNode,this._textRangeRestingSpot))}},{key:"visibleRangeForPosition",value:function(e){var t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new V(t.outsideRenderedLine,t.ranges[0].left):null}},{key:"updateLineWidths",value:function(){this._updateLineWidths(!1)}},{key:"_updateLineWidthsFast",value:function(){return this._updateLineWidths(!0)}},{key:"_updateLineWidthsSlow",value:function(){this._updateLineWidths(!1)}},{key:"_updateLineWidths",value:function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),r=1,i=!0,o=t;o<=n;o++){var a=this._visibleLines.getVisibleLine(o);!e||a.getWidthIsFast()?r=Math.max(r,a.getWidth()):i=!1}return i&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(r),i}},{key:"_checkMonospaceFontAssumptions",value:function(){for(var e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber(),i=n;i<=r;i++){var o=this._visibleLines.getVisibleLine(i);if(o.needsMonospaceFontCheck()){var a=o.getWidth();a>t&&(t=a,e=i)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(var s=n;s<=r;s++){this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}}},{key:"prepareRender",value:function(){throw new Error("Not supported")}},{key:"render",value:function(){throw new Error("Not supported")}},{key:"renderText",value:function(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){var t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var n=this._computeScrollLeftToReveal(t);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:n.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),k.d&&!this._asyncCheckMonospaceFontAssumptions.isScheduled())for(var r=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=r;o<=i;o++){if(this._visibleLines.getVisibleLine(o).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");var a=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-a),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}},{key:"_ensureMaxLineWidth",value:function(e){var t=Math.ceil(e);this._maxLineWidth0){for(var h=r[0].startLineNumber,f=r[0].endLineNumber,p=1,g=r.length;pu){if(!o)return-1;l=a}else if(5===i||6===i)if(6===i&&c<=a&&s<=d)l=c;else{var _=a-Math.max(5*this._lineHeight,.2*u),b=s-u;l=Math.max(b,_)}else if(1===i||2===i)if(2===i&&c<=a&&s<=d)l=c;else{var y=(a+s)/2;l=Math.max(0,y-u/2)}else l=this._computeMinimumScrolling(c,d,a,s,3===i,4===i);return l}},{key:"_computeScrollLeftToReveal",value:function(e){var t=this._context.viewLayout.getCurrentViewport(),r=t.left,o=r+t.width,a=1073741824,s=0;if("range"===e.type){var l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;var c,u=Object(i.a)(l.ranges);try{for(u.s();!(c=u.n()).done;){var d=c.value;a=Math.min(a,d.left),s=Math.max(s,d.left+d.width)}}catch(b){u.e(b)}finally{u.f()}}else{var h,f=Object(i.a)(e.selections);try{for(f.s();!(h=f.n()).done;){var p=h.value;if(p.startLineNumber!==p.endLineNumber)return null;var g=this._visibleRangesForLineRange(p.startLineNumber,p.startColumn,p.endColumn);if(!g)return null;var m,v=Object(i.a)(g.ranges);try{for(v.s();!(m=v.n()).done;){var _=m.value;a=Math.min(a,_.left),s=Math.max(s,_.left+_.width)}}catch(b){v.e(b)}finally{v.f()}}}catch(b){f.e(b)}finally{f.f()}}return a=Math.max(0,a-n.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding,"selections"===e.type&&s-a>t.width?null:{scrollLeft:this._computeMinimumScrolling(r,o,a,s),maxHorizontalOffset:s}}},{key:"_computeMinimumScrolling",value:function(e,t,n,r,i,o){i=!!i,o=!!o;var a=(t|=0)-(e|=0);return(r|=0)-(n|=0)t?Math.max(0,r-a):e:n}}]),n}(F);yt.HORIZONTAL_EXTRA_PX=30;n(461);var St=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this))._context=e;var i=r._context.configuration.options.get(117);return r._decorationsLeft=i.decorationsLeft,r._decorationsWidth=i.decorationsWidth,r._renderResult=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(117);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_getDecorations",value:function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,i=0,o=t.length;i
',o=[],a=t;a<=n;a++){for(var s=a-t,l=r[s],c="",u=0,d=l.length;u';i[a]=l}this._renderResult=i}},{key:"render",value:function(e,t){return this._renderResult?this._renderResult[t-e]:""}}]),n}(pt)),kt=(n(463),function(){function e(t,n,r,i){Object(u.a)(this,e),this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(r),this.a=e._clamp(i)}return Object(d.a)(e,[{key:"equals",value:function(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}}],[{key:"_clamp",value:function(e){return e<0?0:e>255?255:0|e}}]),e}());kt.Empty=new kt(0,0,0,0);var Et=n(20),wt=function(){function e(){var t=this;Object(u.a)(this,e),this._onDidChange=new g.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),Et.C.onDidChange((function(e){e.changedColorMap&&t._updateColorMap()}))}return Object(d.a)(e,[{key:"_updateColorMap",value:function(){var e=Et.C.getColorMap();if(!e)return this._colors=[kt.Empty],void(this._backgroundIsLight=!0);this._colors=[kt.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0)}},{key:"getColor",value:function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}},{key:"backgroundIsLight",value:function(){return this._backgroundIsLight}}],[{key:"getInstance",value:function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE}}]),e}();wt._INSTANCE=null;var Ot=n(81),Tt=n(11),xt=function(){for(var e=[],t=32;t<=126;t++)e.push(t);return e.push(65533),e}(),Nt=n(141),Dt=function(){function e(t,n){Object(u.a)(this,e),this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return Object(d.a)(e,[{key:"renderChar",value:function(e,t,n,r,i,o,a,s,l){var c=1*this.scale,u=2*this.scale,d=l?1:u;if(t+c>e.width||n+d>e.height)console.warn("bad render request outside image data");else for(var h=s?this.charDataLight:this.charDataNormal,f=function(e,t){return(e-=32)<0||e>96?t<=2?(e+96)%96:95:e}(r,a),p=4*e.width,g=o.r,m=o.g,v=o.b,_=i.r-g,b=i.g-m,y=i.b-v,S=e.data,C=f*c*u,k=n*p+4*t,E=0;Ee.width||n+c>e.height)console.warn("bad render request outside image data");else for(var u=4*e.width,d=i.r,h=i.g,f=i.b,p=d+.5*(r.r-d),g=h+.5*(r.g-h),m=f+.5*(r.b-f),v=e.data,_=n*u+4*t,b=0;b>1]=At[e[n]]<<4|15&At[e[n+1]];return t},Rt={1:Object(Lt.a)((function(){return It("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:Object(Lt.a)((function(){return It("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")}))},Mt=function(){function e(){Object(u.a)(this,e)}return Object(d.a)(e,null,[{key:"create",value:function(t,n){return this.lastCreated&&t===this.lastCreated.scale&&n===this.lastFontFamily?this.lastCreated:(r=Rt[t]?new Dt(Rt[t](),t):e.createFromSampleData(e.createSampleData(n).data,t),this.lastFontFamily=n,this.lastCreated=r,r);var r}},{key:"createSampleData",value:function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="".concat(16,"px"),t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold ".concat(16,"px ",e),n.textBaseline="middle";var r,o=0,a=Object(i.a)(xt);try{for(a.s();!(r=a.n()).done;){var s=r.value;n.fillText(String.fromCharCode(s),o,8),o+=10}}catch(l){a.e(l)}finally{a.f()}return n.getImageData(0,0,960,16)}},{key:"createFromSampleData",value:function(t,n){if(61440!==t.length)throw new Error("Unexpected source in MinimapCharRenderer");var r=e._downsample(t,n);return new Dt(r,n)}},{key:"_downsampleChar",value:function(e,t,n,r,i){for(var o=1*i,a=2*i,s=r,l=0,c=0;c0)for(var c=255/s,u=0;u0,k=Math.floor(t.canvasInnerHeight/t.minimapLineHeight);return new e(l,c,C,y,S,_,1,Math.min(a,k))}if(o&&r!==a){var E=r-n+1;d=Math.floor(E*p/f)}else{var w=i/m;d=Math.floor(w*p/f)}h=t.scrollBeyondLastLine?(a-1)*p/f:Math.max(0,a*p/f-d);var O=(h=Math.min(t.minimapHeight-d,h))/(c-i),T=l*O,x=0;t.scrollBeyondLastLine&&(x=i/m-1);if(g>=a+x){return new e(l,c,h>0,O,T,d,1,a)}var N=Math.max(1,Math.floor(n-T*f/p));return u&&u.scrollHeight===c&&(u.scrollTop>l&&(N=Math.min(N,u.startLineNumber)),u.scrollTop0&&this.minimapLines[n-1]>=e;)n--;for(var r=this.modelLineToMinimapLine(t)-1;r+1t)return null}return[n+1,r+1]}},{key:"decorationLineRangeToMinimapLineRange",value:function(e,t){var n=this.modelLineToMinimapLine(e),r=this.modelLineToMinimapLine(t);return e!==t&&r===n&&(r===this.minimapLines.length?n>1&&n--:r++),[n,r]}},{key:"onLinesDeleted",value:function(e){for(var t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,r=0,i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]=0&&!(this.minimapLines[n]1){for(var d=0,h=s-1;d0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(r)}},{key:"_recreateLineSampling",value:function(){this._minimapSelections=null;var e=Boolean(this._samplingState),t=zt.compute(this.options,this._context.model.getLineCount(),this._samplingState),n=Object(r.a)(t,2),o=n[0],a=n[1];if(this._samplingState=o,e&&this._samplingState){var s,l=Object(i.a)(a);try{for(l.s();!(s=l.n()).done;){var c=s.value;switch(c.type){case"deleted":this._actual.onLinesDeleted(c.deleteFromLineNumber,c.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(c.insertFromLineNumber,c.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}}catch(u){l.e(u)}finally{l.f()}}}},{key:"getLineCount",value:function(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}},{key:"getRealLineCount",value:function(){return this._context.model.getLineCount()}},{key:"getLineContent",value:function(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}},{key:"getMinimapLinesRenderingData",value:function(e,t,n){if(this._samplingState){for(var r=[],i=0,o=t-e+1;i140)o._model.setScrollTop(i.scrollTop);else{var s=e-n;o._model.setScrollTop(i.getDesiredScrollTopFromDelta(s))}};r!==n&&a(r,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,x.b,(function(e){return a(e.posy,e.posx)}),(function(){o._slider.toggleClassName("active",!1)}))}},{key:"scrollDueToTouchEvent",value:function(e){var t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}},{key:"dispose",value:function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_getMinimapDomNodeClassName",value:function(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}},{key:"getDomNode",value:function(){return this._domNode}},{key:"_applyLayout",value:function(){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)}},{key:"_getBuffer",value:function(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Ht(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}},{key:"onDidChangeOptions",value:function(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}},{key:"onSelectionChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onDecorationsChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onFlushed",value:function(){return this._lastRenderData=null,!0}},{key:"onLinesChanged",value:function(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}},{key:"onLinesDeleted",value:function(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}},{key:"onLinesInserted",value:function(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}},{key:"onScrollChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onThemeChanged",value:function(){return this._selectionColor=this._theme.getColor(Tt.Pb),this._renderDecorations=!0,!0}},{key:"onTokensChanged",value:function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}},{key:"onTokensColorsChanged",value:function(){return this._lastRenderData=null,this._buffers=null,!0}},{key:"onZonesChanged",value:function(){return this._lastRenderData=null,!0}},{key:"render",value:function(e){if(0===this._model.options.renderMinimap)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");var t=Ft.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(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,r=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(r),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-r),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}},{key:"renderDecorations",value:function(e){if(this._renderDecorations){this._renderDecorations=!1;var t=this._model.getSelections(),n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),r=this._model.options,i=r.canvasInnerWidth,o=r.canvasInnerHeight,a=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,i,o);for(var u=new Map,d=0;dthis._model.options.canvasInnerHeight)){var d=t.get(o),h=!d;if(!d){var f=this._model.getLineContent(o);d=[Q.h];for(var p=1;po?d.length-1:_-1;if(C>0){var k=d[C]-S||2;this.renderDecoration(e,r,S,u,k,a)}h&&this.renderLineHighlight(e,r,u,a)}}},{key:"renderLineHighlight",value:function(e,t,n,r){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(Q.h,n,e.canvas.width,r)}},{key:"renderDecoration",value:function(e,t,n,r,i,o){e.fillStyle=t&&t.toString()||"",e.fillRect(n,r,i,o)}},{key:"renderLines",value:function(e){var t=e.startLineNumber,i=e.endLineNumber,o=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new Ut(e,a.imageData,a.lines)}var s=this._getBuffer();if(!s)return null;for(var l=n._renderUntouchedLines(s,t,i,o,this._lastRenderData),c=Object(r.a)(l,3),u=c[0],d=c[1],h=c[2],f=this._model.getMinimapLinesRenderingData(t,i,h),p=this._model.getOptions().tabSize,g=this._model.options.backgroundColor,m=this._model.tokensColorTracker,v=m.backgroundIsLight(),_=this._model.options.renderMinimap,b=this._model.options.charRenderer(),y=this._model.options.fontScale,S=this._model.options.minimapCharWidth,C=(1===_?2:3)*y,k=o>C?Math.floor((o-C)/2):0,E=0,w=[],O=0,T=i-t+1;O=0&&wg)return;var w=f.charCodeAt(_);if(9===w){var O=c-(_+b)%c;b+=O-1,v+=O*i}else if(32===w)v+=i;else for(var T=Ae.E(w)?2:1,x=0;xg)return}}}]),n}(m.a);Object($.g)((function(e,t){var n=e.getColor(Tt.Mb);n&&t.addRule(".monaco-editor .minimap > canvas { opacity: ".concat(n.rgba.a,"; will-change: opacity; }"));var r=e.getColor(Tt.Rb);r&&t.addRule(".monaco-editor .minimap-slider .minimap-slider-horizontal { background: ".concat(r,"; }"));var i=e.getColor(Tt.Sb);i&&t.addRule(".monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ".concat(i,"; }"));var o=e.getColor(Tt.Qb);o&&t.addRule(".monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ".concat(o,"; }"));var a=e.getColor(Tt.ic);a&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: ".concat(a," -6px 0 6px -6px inset; }"))}));n(464);var Gt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options.get(117);return r._widgets={},r._verticalScrollbarWidth=i.verticalScrollbarWidth,r._minimapWidth=i.minimap.minimapWidth,r._horizontalScrollbarHeight=i.horizontalScrollbarHeight,r._editorHeight=i.height,r._editorWidth=i.width,r._domNode=Object(C.b)(document.createElement("div")),B.write(r._domNode,4),r._domNode.setClassName("overlayWidgets"),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._widgets={}}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(117);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}},{key:"addWidget",value:function(e){var t=Object(C.b)(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()}},{key:"setWidgetPosition",value:function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)}},{key:"removeWidget",value:function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}},{key:"_renderWidget",value:function(e){var 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){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-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()}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,r=t.length;n=3){var i=Math.floor(r/3),o=Math.floor(r/3),a=r-i-o,s=e+i;return[[0,e,s,e,e+i+a,e,s,e],[0,i,a,i+a,o,i+a+o,a+o,i+a+o]]}if(2===n){var l=Math.floor(r/2),c=r-l;return[[0,e,e,e,e+l,e,e,e],[0,l,l,l,c,l+c,l+c,l+c]]}return[[0,e,e,e,e,e,e,e],[0,r,r,r,r,r,r,r]]}},{key:"equals",value:function(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}}]),e}(),Yt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e))._domNode=Object(C.b)(document.createElement("canvas")),r._domNode.setClassName("decorationsOverviewRuler"),r._domNode.setPosition("absolute"),r._domNode.setLayerHinting(!0),r._domNode.setContain("strict"),r._domNode.setAttribute("aria-hidden","true"),r._updateSettings(!1),r._tokensColorTrackerListener=Et.C.onDidChange((function(e){e.changedColorMap&&r._updateSettings(!0)})),r._cursorPositions=[],r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._tokensColorTrackerListener.dispose()}},{key:"_updateSettings",value:function(e){var t=new Kt(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)}},{key:"onConfigurationChanged",value:function(e){return this._updateSettings(!1)}},{key:"onCursorStateChanged",value:function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(O=t-s),E=O-s,w=O+s}E>_+1||S!==m?(0!==b&&l.fillRect(c[m],v,u[m],_-v),m=S,v=E,_=w):w>_&&(_=w)}l.fillRect(c[m],v,u[m],_-v)}if(!this._settings.hideCursor&&this._settings.cursorColor){var T=2*this._settings.pixelRatio|0,x=T/2|0,N=this._settings.x[7],D=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(var L=-100,A=-100,I=0,R=this._cursorPositions.length;It&&(P=t-x);var j=P-x,F=j+T;j>A+1?(0!==I&&l.fillRect(N,L,D,A-L),L=j,A=F):F>A&&(A=F)}l.fillRect(N,L,D,A-L)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")}}]),n}(F),$t=n(199),Qt=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(u.a)(this,n),(i=t.call(this))._context=e;var a=i._context.configuration.options;return i._domNode=Object(C.b)(document.createElement("canvas")),i._domNode.setClassName(r),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._domNode.setContain("strict"),i._zoneManager=new $t.b((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(a.get(51)),i._zoneManager.setPixelRatio(a.get(115)),i._context.addEventHandler(Object(o.a)(i)),i}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var 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}},{key:"onFlushed",value:function(e){return this._render(),!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}},{key:"onZonesChanged",value:function(e){return this._render(),!0}},{key:"getDomNode",value:function(){return this._domNode.domNode}},{key:"setLayout",value:function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||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())}},{key:"setZones",value:function(e){this._zoneManager.setZones(e),this._render()}},{key:"_render",value:function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),r=this._zoneManager.getId2Color(),i=this._domNode.domNode.getContext("2d");return i.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(i,n,r,e),!0}},{key:"_renderOneLane",value:function(e,t,n,r){var o,a=0,s=0,l=0,c=Object(i.a)(t);try{for(c.s();!(o=c.n()).done;){var u=o.value,d=u.colorId,h=u.from,f=u.to;d!==a?(e.fillRect(0,s,r,l-s),a=d,e.fillStyle=n[a],s=h,l=f):l>=h?l=Math.max(l,f):(e.fillRect(0,s,r,l-s),s=h,l=f)}}catch(p){c.e(p)}finally{c.f()}e.fillRect(0,s,r,l-s)}}]),n}(j),Zt=(n(465),function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this,e)).domNode=Object(C.b)(document.createElement("div")),r.domNode.setAttribute("role","presentation"),r.domNode.setAttribute("aria-hidden","true"),r.domNode.setClassName("view-rulers"),r._renderedRulers=[];var i=r._context.configuration.options;return r._rulers=i.get(83),r._typicalHalfwidthCharacterWidth=i.get(36).typicalHalfwidthCharacterWidth,r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._rulers=t.get(83),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged}},{key:"prepareRender",value:function(e){}},{key:"_ensureRulersCount",value:function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){var i=Object(C.b)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(n),this.domNode.appendChild(i),this._renderedRulers.push(i),r--}else for(var o=e-t;o>0;){var a=this._renderedRulers.pop();this.domNode.removeChild(a),o--}}},{key:"render",value:function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"_updateWidth",value:function(){var e=this._context.configuration.options.get(117);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(84);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}},{key:"onScrollChanged",value:function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}]),n}(F);Object($.g)((function(e,t){var n=e.getColor(Tt.ic);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: ".concat(n," 0 6px 6px -6px inset; }"))}));n(467);var Jt=function e(t){Object(u.a)(this,e),this.left=t.left,this.width=t.width,this.startStyle=null,this.endStyle=null},en=function e(t,n){Object(u.a)(this,e),this.lineNumber=t,this.ranges=n};function tn(e){return new Jt(e)}function nn(e){return new en(e.lineNumber,e.ranges.map(tn))}var rn=T.f,on=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n),(r=t.call(this))._previousFrameVisibleRangesWithStyle=[],r._context=e;var i=r._context.configuration.options;return r._lineHeight=i.get(51),r._roundedSelection=i.get(82),r._typicalHalfwidthCharacterWidth=i.get(36).typicalHalfwidthCharacterWidth,r._selections=[],r._renderResult=null,r._context.addEventHandler(Object(o.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(51),this._roundedSelection=t.get(82),this._typicalHalfwidthCharacterWidth=t.get(36).typicalHalfwidthCharacterWidth,!0}},{key:"onCursorStateChanged",value:function(e){return this._selections=e.selections.slice(0),!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_visibleRangesHaveGaps",value:function(e){for(var t=0,n=e.length;t1)return!0}return!1}},{key:"_enrichVisibleRangesWithStyle",value:function(e,t,n){var r=this._typicalHalfwidthCharacterWidth/4,i=null,o=null;if(n&&n.length>0&&t.length>0){var a=t[0].lineNumber;if(a===e.startLineNumber)for(var s=0;!i&&s=0;c--)n[c].lineNumber===l&&(o=n[c].ranges[0]);i&&!i.startStyle&&(i=null),o&&!o.startStyle&&(o=null)}for(var u=0,d=t.length;u0){var v=t[u-1].ranges[0].left,_=t[u-1].ranges[0].left+t[u-1].ranges[0].width;an(f-v)v&&(g.top=1),an(p-_)'}},{key:"_actualRenderOneSelection",value:function(e,t,r,i){if(0!==i.length)for(var o=!!i[0].ranges[0].startStyle,a=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),l=i[0].lineNumber,c=i[i.length-1].lineNumber,u=0,d=i.length;u1,u)}}this._previousFrameVisibleRangesWithStyle=a,this._renderResult=t.map((function(e){var t=Object(r.a)(e,2);return t[0]+t[1]}))}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Me);function an(e){return e<0?-e:e}on.SELECTION_CLASS_NAME="selected-text",on.SELECTION_TOP_LEFT="top-left-radius",on.SELECTION_BOTTOM_LEFT="bottom-left-radius",on.SELECTION_TOP_RIGHT="top-right-radius",on.SELECTION_BOTTOM_RIGHT="bottom-right-radius",on.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",on.ROUNDED_PIECE_WIDTH=10,Object($.g)((function(e,t){var n=e.getColor(Tt.O);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: ".concat(n,"; }"));var r=e.getColor(Tt.J);r&&t.addRule(".monaco-editor .selected-text { background-color: ".concat(r,"; }"));var i=e.getColor(Tt.P);i&&!i.isTransparent()&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: ".concat(i,"; }"))}));n(468);var sn=function e(t,n,r,i,o,a){Object(u.a)(this,e),this.top=t,this.left=n,this.width=r,this.height=i,this.textContent=o,this.textContentClassName=a},ln=function(){function e(t){Object(u.a)(this,e),this._context=t;var n=this._context.configuration.options,r=n.get(36);this._cursorStyle=n.get(19),this._lineHeight=n.get(51),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(22),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(C.b)(document.createElement("div")),this._domNode.setClassName("cursor ".concat(Ue.a)),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),_.a.applyFontInfo(this._domNode,r),this._domNode.setDisplay("none"),this._position=new ce.a(1,1),this._lastRenderedContent="",this._renderData=null}return Object(d.a)(e,[{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return this._position}},{key:"show",value:function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}},{key:"hide",value:function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(36);return this._cursorStyle=t.get(19),this._lineHeight=t.get(51),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(22),this._typicalHalfwidthCharacterWidth),_.a.applyFontInfo(this._domNode,n),!0}},{key:"onCursorPositionChanged",value:function(e){return this._position=e,!0}},{key:"_prepareRender",value:function(e){var t="";if(this._cursorStyle===Q.i.Line||this._cursorStyle===Q.i.LineThin){var n,r=e.visibleRangeForPosition(this._position);if(!r||r.outsideRenderedLine)return null;if(this._cursorStyle===Q.i.Line){if((n=f.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){var i=this._context.model.getLineContent(this._position.lineNumber),o=Ae.L(i,this._position.column-1);t=i.substr(this._position.column-1,o)}}else n=f.computeScreenAwareSize(1);var a=r.left;n>=2&&a>=1&&(a-=1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new sn(s,a,n,this._lineHeight,t,"")}var l=this._context.model.getLineContent(this._position.lineNumber),c=Ae.L(l,this._position.column-1),u=e.linesVisibleRangesForRange(new ue.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+c),!1);if(!u||0===u.length)return null;var d=u[0];if(d.outsideRenderedLine||0===d.ranges.length)return null;var h=d.ranges[0],p=h.width<1?this._typicalHalfwidthCharacterWidth:h.width,g="";if(this._cursorStyle===Q.i.Block){var m=this._context.model.getViewLineData(this._position.lineNumber);t=l.substr(this._position.column-1,c);var v=m.tokens.findTokenIndexAtOffset(this._position.column-1);g=m.tokens.getClassName(v)}var _=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,b=this._lineHeight;return this._cursorStyle!==Q.i.Underline&&this._cursorStyle!==Q.i.UnderlineThin||(_+=this._lineHeight-2,b=2),new sn(_,h.left,p,b,t,g)}},{key:"prepareRender",value:function(e){this._renderData=this._prepareRender(e)}},{key:"render",value:function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor ".concat(Ue.a," ").concat(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)}}]),e}(),cn=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(u.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options;return r._readOnly=i.get(72),r._cursorBlinking=i.get(17),r._cursorStyle=i.get(19),r._cursorSmoothCaretAnimation=i.get(18),r._selectionIsEmpty=!0,r._isVisible=!1,r._primaryCursor=new ln(r._context),r._secondaryCursors=[],r._renderData=[],r._domNode=Object(C.b)(document.createElement("div")),r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true"),r._updateDomClassName(),r._domNode.appendChild(r._primaryCursor.getDomNode()),r._startCursorBlinkAnimation=new O.e,r._cursorFlatBlinkInterval=new O.c,r._blinkingEnabled=!1,r._editorHasFocus=!1,r._updateBlinking(),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onConfigurationChanged",value:function(e){var 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(var n=0,r=this._secondaryCursors.length;nt.length)for(var o=this._secondaryCursors.length-t.length,a=0;an)for(var o=t-n,a=0;a=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}},{key:"_getAll",value:function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;th&&w.index--}}catch(O){E.e(O)}finally{E.f()}e.splice(h,1),t.splice(d,1),this._removeSecondaryCursor(h-1),o--}}}}}}]),e}(),_n=n(234),bn=n(136),yn=function(){function e(t){Object(u.a)(this,e),this.type=0,this._source=t}return Object(d.a)(e,[{key:"hasChanged",value:function(e){return this._source.hasChanged(e)}}]),e}(),Sn=function e(t,n){Object(u.a)(this,e),this.type=1,this.selections=t,this.modelSelections=n},Cn=function e(t){Object(u.a)(this,e),this.type=2,t?(this.affectsMinimap=t.affectsMinimap,this.affectsOverviewRuler=t.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)},kn=function e(){Object(u.a)(this,e),this.type=3},En=function e(t){Object(u.a)(this,e),this.type=4,this.isFocused=t},wn=function e(){Object(u.a)(this,e),this.type=5},On=function e(){Object(u.a)(this,e),this.type=6},Tn=function e(t,n){Object(u.a)(this,e),this.type=7,this.fromLineNumber=t,this.toLineNumber=n},xn=function e(t,n){Object(u.a)(this,e),this.type=8,this.fromLineNumber=t,this.toLineNumber=n},Nn=function e(t,n){Object(u.a)(this,e),this.type=9,this.fromLineNumber=t,this.toLineNumber=n},Dn=function e(t,n,r,i,o,a){Object(u.a)(this,e),this.type=10,this.source=t,this.range=n,this.selections=r,this.verticalType=i,this.revealHorizontal=o,this.scrollType=a},Ln=function e(t){Object(u.a)(this,e),this.type=11,this.scrollWidth=t.scrollWidth,this.scrollLeft=t.scrollLeft,this.scrollHeight=t.scrollHeight,this.scrollTop=t.scrollTop,this.scrollWidthChanged=t.scrollWidthChanged,this.scrollLeftChanged=t.scrollLeftChanged,this.scrollHeightChanged=t.scrollHeightChanged,this.scrollTopChanged=t.scrollTopChanged},An=function e(){Object(u.a)(this,e),this.type=12},In=function e(t){Object(u.a)(this,e),this.type=13,this.ranges=t},Rn=function e(){Object(u.a)(this,e),this.type=14},Mn=function e(){Object(u.a)(this,e),this.type=15},Pn=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.call(this))._onEvent=e._register(new g.a),e.onEvent=e._onEvent.event,e._eventHandlers=[],e._viewEventQueue=null,e._isConsumingViewEventQueue=!1,e._collector=null,e._collectorCnt=0,e._outgoingEvents=[],e}return Object(d.a)(n,[{key:"emitOutgoingEvent",value:function(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}},{key:"_addOutgoingEvent",value:function(e){for(var t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;var e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}},{key:"addViewEventHandler",value:function(e){for(var t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}},{key:"emitSingleViewEvent",value:function(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}},{key:"_emitMany",value:function(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}},{key:"_consumeViewEventQueue",value:function(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}},{key:"_doConsumeQueue",value:function(){for(;this._viewEventQueue;){var e=this._viewEventQueue;this._viewEventQueue=null;var t,n=this._eventHandlers.slice(0),r=Object(i.a)(n);try{for(r.s();!(t=r.n()).done;){t.value.handleEvents(e)}}catch(o){r.e(o)}finally{r.f()}}}}]),n}(m.a),jn=function(){function e(){Object(u.a)(this,e),this.viewEvents=[],this.outgoingEvents=[]}return Object(d.a)(e,[{key:"emitViewEvent",value:function(e){this.viewEvents.push(e)}},{key:"emitOutgoingEvent",value:function(e){this.outgoingEvents.push(e)}}]),e}(),Fn=function(){function e(t,n,r,i){Object(u.a)(this,e),this.kind=0,this._oldContentWidth=t,this._oldContentHeight=n,this.contentWidth=r,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!this.contentWidthChanged&&!this.contentHeightChanged}},{key:"merge",value:function(t){return 0!==t.kind?this:new e(this._oldContentWidth,this._oldContentHeight,t.contentWidth,t.contentHeight)}}]),e}(),Bn=function(){function e(t,n){Object(u.a)(this,e),this.kind=1,this.oldHasFocus=t,this.hasFocus=n}return Object(d.a)(e,[{key:"isNoOp",value:function(){return this.oldHasFocus===this.hasFocus}},{key:"merge",value:function(t){return 1!==t.kind?this:new e(this.oldHasFocus,t.hasFocus)}}]),e}(),Un=function(){function e(t,n,r,i,o,a,s,l){Object(u.a)(this,e),this.kind=2,this._oldScrollWidth=t,this._oldScrollLeft=n,this._oldScrollHeight=r,this._oldScrollTop=i,this.scrollWidth=o,this.scrollLeft=a,this.scrollHeight=s,this.scrollTop=l,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}},{key:"merge",value:function(t){return 2!==t.kind?this:new e(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,t.scrollWidth,t.scrollLeft,t.scrollHeight,t.scrollTop)}}]),e}(),Hn=function(){function e(){Object(u.a)(this,e),this.kind=3}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!1}},{key:"merge",value:function(e){return this}}]),e}(),zn=function(){function e(t,n,r,i,o,a,s){Object(u.a)(this,e),this.kind=5,this.oldSelections=t,this.selections=n,this.oldModelVersionId=r,this.modelVersionId=i,this.source=o,this.reason=a,this.reachedMaxCursorCount=s}return Object(d.a)(e,[{key:"isNoOp",value:function(){return e._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}},{key:"merge",value:function(t){return 5!==t.kind?this:new e(this.oldSelections,t.selections,this.oldModelVersionId,t.modelVersionId,t.source,t.reason,this.reachedMaxCursorCount||t.reachedMaxCursorCount)}}],[{key:"_selectionsAreEqual",value:function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}],[{key:"getAllAutoClosedCharacters",value:function(e){var t,n=[],r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;n=n.concat(o.getAutoClosedCharactersRanges())}}catch(a){r.e(a)}finally{r.f()}return n}}]),e}(),qn=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,o){var a;return Object(u.a)(this,n),(a=t.call(this))._model=e,a._knownModelVersionId=a._model.getVersionId(),a._viewModel=r,a._coordinatesConverter=i,a.context=new de.c(a._model,a._coordinatesConverter,o),a._cursors=new vn(a.context),a._hasFocus=!1,a._isHandling=!1,a._isDoingComposition=!1,a._selectionsWhenCompositionStarted=null,a._columnSelectData=null,a._autoClosedActions=[],a._prevEditOperationType=0,a}return Object(d.a)(n,[{key:"dispose",value:function(){this._cursors.dispose(),this._autoClosedActions=Object(m.f)(this._autoClosedActions),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"updateConfiguration",value:function(e){this.context=new de.c(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}},{key:"onLineMappingChanged",value:function(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}},{key:"setHasFocus",value:function(e){this._hasFocus=e}},{key:"_validateAutoClosedActions",value:function(){if(this._autoClosedActions.length>0)for(var e=this._cursors.getSelections(),t=0;tn.MAX_CURSOR_COUNT&&(i=i.slice(0,n.MAX_CURSOR_COUNT),o=!0);var a=new Wn(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,r,a,o)}},{key:"setCursorColumnSelectData",value:function(e){this._columnSelectData=e}},{key:"revealPrimary",value:function(e,t,n,r){var i=this._cursors.getViewPositions();if(i.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,n,r);else{var o=i[0],a=new ue.a(o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,a,null,0,n,r)}}},{key:"_revealPrimaryCursor",value:function(e,t,n,r,i){var o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),n,r,i);else{var a=o[0],s=new ue.a(a.lineNumber,a.column,a.lineNumber,a.column);this._emitCursorRevealRange(e,t,s,null,n,r,i)}}},{key:"_emitCursorRevealRange",value:function(e,t,n,r,i,o,a){e.emitViewEvent(new Dn(t,n,r,i,o,a))}},{key:"saveState",value:function(){for(var e=[],t=this._cursors.getSelections(),n=0,r=t.length;n0){var r=de.d.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,r)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{var i=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,de.d.fromModelSelections(i))}}}},{key:"getSelection",value:function(){return this._cursors.getPrimaryCursor().modelState.selection}},{key:"getTopMostViewPosition",value:function(){return this._cursors.getTopMostViewPosition()}},{key:"getBottomMostViewPosition",value:function(){return this._cursors.getBottomMostViewPosition()}},{key:"getCursorColumnSelectData",value:function(){if(this._columnSelectData)return this._columnSelectData;var e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:de.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:de.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n)}}},{key:"getSelections",value:function(){return this._cursors.getSelections()}},{key:"setSelections",value:function(e,t,n){this.setStates(e,t,0,de.d.fromModelSelections(n))}},{key:"getPrevEditOperationType",value:function(){return this._prevEditOperationType}},{key:"setPrevEditOperationType",value:function(e){this._prevEditOperationType=e}},{key:"_pushAutoClosedAction",value:function(e,t){for(var n=[],r=[],i=0,o=e.length;i0&&this._pushAutoClosedAction(n,r),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}}},{key:"_interpretCommandResult",value:function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}},{key:"_emitStateChangedIfNecessary",value:function(e,t,n,r,i){var o=new Wn(this._model,this);if(o.equals(r))return!1;var a=this._cursors.getSelections(),s=this._cursors.getViewSelections();if(e.emitViewEvent(new Sn(s,a)),!r||r.cursorState.length!==o.cursorState.length||o.cursorState.some((function(e,t){return!e.modelState.equals(r.cursorState[t].modelState)}))){var l=r?r.cursorState.map((function(e){return e.modelState.selection})):null,c=r?r.modelVersionId:0;e.emitOutgoingEvent(new zn(l,a,c,o.modelVersionId,t||"keyboard",n,i))}return!0}},{key:"_findAutoClosingPairs",value:function(e){if(!e.length)return null;for(var t=[],n=0,r=e.length;n=0)return null;var o=i.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;var a=o[1],s=this.context.cursorConfig.autoClosingPairsClose2.get(a);if(!s||1!==s.length)return null;var l=s[0].open,c=i.text.length-o[2].length-1,u=i.text.lastIndexOf(l,c-1);if(-1===u)return null;t.push([u,c])}return t}},{key:"executeEdits",value:function(e,t,n,i){var o=this,a=null;"snippet"===t&&(a=this._findAutoClosingPairs(n)),a&&(n[0]._isTracked=!0);var s=[],l=[],c=this._model.pushEditOperations(this.getSelections(),n,(function(e){if(a)for(var t=0,n=a.length;t0&&this._pushAutoClosedAction(s,l)}},{key:"_executeEdit",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!this.context.cursorConfig.readOnly){var i=new Wn(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Object(p.e)(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,r,i,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}}},{key:"setIsDoingComposition",value:function(e){this._isDoingComposition=e}},{key:"startComposition",value:function(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}},{key:"endComposition",value:function(e,t){var n=this;this._executeEdit((function(){if("keyboard"===t){var e=Gn.getAllAutoClosedCharacters(n._autoClosedActions);n._executeEditOperation(bn.a.compositionEndWithInterceptors(n._prevEditOperationType,n.context.cursorConfig,n._model,n._selectionsWhenCompositionStarted,n.getSelections(),e)),n._selectionsWhenCompositionStarted=null}}),e,t)}},{key:"type",value:function(e,t,n){var r=this;this._executeEdit((function(){if("keyboard"===n)for(var e=t.length,i=0;i0&&(a[0]._isTracked=!0);var c=e.model.pushEditOperations(e.selectionsBefore,a,(function(n){for(var r=[],o=0;o0?(r[n].sort(c),u[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return r[n]},getTrackedSelection:function(t){var n=parseInt(t,10),r=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new S.a(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn):new S.a(r.endLineNumber,r.endColumn,r.startLineNumber,r.startColumn)}})):u[n]=e.selectionsBefore[n]},h=0;h2&&void 0!==arguments[2]&&arguments[2];ue.a.isEmpty(e)&&""===o||r.push({identifier:{major:t,minor:i++},range:e,text:o,forceMoveMarkers:a,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},a=!1,s={addEditOperation:o,addTrackedEditOperation:function(e,t,n){a=!0,o(e,t,n)},trackSelection:function(t,n){var r,i=S.a.liftSelection(t);if(i.isEmpty())if("boolean"===typeof n)r=n?2:3;else{var o=e.model.getLineMaxColumn(i.startLineNumber);r=i.startColumn===o?2:3}else r=1;var a=e.trackedRanges.length,s=e.model._setTrackedRange(null,i,r);return e.trackedRanges[a]=s,e.trackedRangesDirection[a]=i.getDirection(),a.toString()}};try{n.getEditOperations(e.model,s)}catch(l){return Object(p.e)(l),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:a}}},{key:"_getLoserCursorMap",value:function(e){(e=e.slice(0)).sort((function(e,t){return-ue.a.compareRangesUsingEnds(e.range,t.range)}));for(var t={},n=1;ni.identifier.major?r.identifier.major:i.identifier.major).toString()]=!0;for(var a=0;a0&&n--}}return t}}]),e}(),Yn=n(273),$n=n(158),Qn=n(13),Zn=n(235),Xn=n(211),Jn=function(){function e(){Object(u.a)(this,e),this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return Object(d.a)(e,[{key:"insert",value:function(e){this._hasPending=!0,this._inserts.push(e)}},{key:"change",value:function(e){this._hasPending=!0,this._changes.push(e)}},{key:"remove",value:function(e){this._hasPending=!0,this._removes.push(e)}},{key:"mustCommit",value:function(){return this._hasPending}},{key:"commit",value:function(e){if(this._hasPending){var t=this._inserts,n=this._changes,r=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,r)}}}]),e}(),er=function e(t,n,r,i,o){Object(u.a)(this,e),this.id=t,this.afterLineNumber=n,this.ordinal=r,this.height=i,this.minWidth=o,this.prefixSum=0},tr=function(){function e(t,n,r,i){Object(u.a)(this,e),this._instanceId=Ae.R(++e.INSTANCE_COUNT),this._pendingChanges=new Jn,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=n,this._paddingTop=r,this._paddingBottom=i}return Object(d.a)(e,[{key:"setLineHeight",value:function(e){this._checkPendingChanges(),this._lineHeight=e}},{key:"setPadding",value:function(e,t){this._paddingTop=e,this._paddingBottom=t}},{key:"onFlushed",value:function(e){this._checkPendingChanges(),this._lineCount=e}},{key:"changeWhitespace",value:function(e){var t=this,n=!1;try{e({insertWhitespace:function(e,r,i,o){n=!0,e|=0,r|=0,i|=0,o|=0;var a=t._instanceId+ ++t._lastWhitespaceId;return t._pendingChanges.insert(new er(a,e,r,i,o)),a},changeOneWhitespace:function(e,r,i){n=!0,r|=0,i|=0,t._pendingChanges.change({id:e,newAfterLineNumber:r,newHeight:i})},removeWhitespace:function(e){n=!0,t._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return n}},{key:"_commitPendingChanges",value:function(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){var r,o=Object(i.a)(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;this._insertWhitespace(a)}}catch(E){o.e(E)}finally{o.f()}var s,l=Object(i.a)(t);try{for(l.s();!(s=l.n()).done;){var c=s.value;this._changeOneWhitespace(c.id,c.newAfterLineNumber,c.newHeight)}}catch(E){l.e(E)}finally{l.f()}var u,d=Object(i.a)(n);try{for(d.s();!(u=d.n()).done;){var h=u.value,f=this._findWhitespaceIndex(h.id);-1!==f&&this._removeWhitespace(f)}}catch(E){d.e(E)}finally{d.f()}}else{var p,g=new Set,m=Object(i.a)(n);try{for(m.s();!(p=m.n()).done;){var v=p.value;g.add(v.id)}}catch(E){m.e(E)}finally{m.f()}var _,b=new Map,y=Object(i.a)(t);try{for(y.s();!(_=y.n()).done;){var S=_.value;b.set(S.id,S)}}catch(E){y.e(E)}finally{y.f()}var C=function(e){var t,n=[],r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!g.has(o.id)){if(b.has(o.id)){var a=b.get(o.id);o.afterLineNumber=a.newAfterLineNumber,o.height=a.newHeight}n.push(o)}}}catch(E){r.e(E)}finally{r.f()}return n},k=C(this._arr).concat(C(e));k.sort((function(e,t){return e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber})),this._arr=k,this._prefixSumValidIndex=-1}}},{key:"_checkPendingChanges",value:function(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}},{key:"_insertWhitespace",value:function(t){var n=e.findInsertionIndex(this._arr,t.afterLineNumber,t.ordinal);this._arr.splice(n,0,t),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}},{key:"_findWhitespaceIndex",value:function(e){for(var t=this._arr,n=0,r=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}},{key:"onLinesInserted",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,r=this._arr.length;n=t.length||t[i+1].afterLineNumber>=e)return i;n=i+1|0}else r=i-1|0}return-1}},{key:"_findFirstWhitespaceAfterLineNumber",value:function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}},{key:"getWhitespaceMinWidth",value:function(){if(this._checkPendingChanges(),-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;tthis.getLinesTotalHeight()}},{key:"getLineNumberAtOrAfterVerticalOffset",value:function(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,r=1,i=t;r=a+n)r=o+1;else{if(e>=a)return o;i=o}}return r>t?t:r}},{key:"getLinesViewportData",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,r,i=this._lineHeight,o=0|this.getLineNumberAtOrAfterVerticalOffset(e),a=0|this.getVerticalOffsetForLineNumber(o),s=0|this._lineCount,l=0|this.getFirstWhitespaceIndexAfterLineNumber(o),c=0|this.getWhitespacesCount();-1===l?(l=c,r=s+1,n=0):(r=0|this.getAfterLineNumberForWhitespaceIndex(l),n=0|this.getHeightForWhitespaceIndex(l));var u=a,d=u,h=5e5,f=0;a>=h&&(f=Math.floor(a/h)*h,d-=f=Math.floor(f/i)*i);for(var p=[],g=e+(t-e)/2,m=-1,v=o;v<=s;v++){if(-1===m){(u<=g&&gg)&&(m=v)}for(u+=i,p[v-o]=d,d+=i;r===v;)d+=n,u+=n,++l>=c?r=s+1:(r=0|this.getAfterLineNumberForWhitespaceIndex(l),n=0|this.getHeightForWhitespaceIndex(l));if(u>=t){s=v;break}}-1===m&&(m=s);var _=0|this.getVerticalOffsetForLineNumber(s),b=o,y=s;return bt&&y--,{bigNumbersDelta:f,startLineNumber:o,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:y}}},{key:"getVerticalOffsetForWhitespaceIndex",value:function(e){this._checkPendingChanges(),e|=0;var t=this.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this.getWhitespacesAccumulatedHeight(e-1):0)+this._paddingTop}},{key:"getWhitespaceIndexAtOrAfterVerticallOffset",value:function(e){this._checkPendingChanges(),e|=0;var t=0,n=this.getWhitespacesCount()-1;if(n<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(n)+this.getHeightForWhitespaceIndex(n))return-1;for(;t=i+this.getHeightForWhitespaceIndex(r))t=r+1;else{if(e>=i)return r;n=r}}return t}},{key:"getWhitespaceAtVerticalOffset",value:function(e){this._checkPendingChanges(),e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var r=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:r}}},{key:"getWhitespaceViewportData",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),r=this.getWhitespacesCount()-1;if(n<0)return[];for(var i=[],o=n;o<=r;o++){var a=this.getVerticalOffsetForWhitespaceIndex(o),s=this.getHeightForWhitespaceIndex(o);if(a>=t)break;i.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:s})}return i}},{key:"getWhitespaces",value:function(){return this._checkPendingChanges(),this._arr.slice(0)}},{key:"getWhitespacesCount",value:function(){return this._checkPendingChanges(),this._arr.length}},{key:"getIdForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}},{key:"getAfterLineNumberForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}},{key:"getHeightForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}],[{key:"findInsertionIndex",value:function(e,t,n){for(var r=0,i=e.length;r>>1;t===e[o].afterLineNumber?n=t?0:n.horizontalScrollbarSize}},{key:"_getContentHeight",value:function(e,t,n){var r=this._configuration.options,i=this._linesLayout.getLinesTotalHeight();return r.get(86)?i+=t-r.get(51):i+=this._getHorizontalScrollbarHeight(e,n),i}},{key:"_updateHeight",value:function(){var e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,r=e.contentWidth;this._scrollable.setScrollDimensions(new nr(t,e.contentWidth,n,this._getContentHeight(t,n,r)))}},{key:"getCurrentViewport",value:function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Ot.f(t.scrollTop,t.scrollLeft,e.width,e.height)}},{key:"getFutureViewport",value:function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Ot.f(t.scrollTop,t.scrollLeft,e.width,e.height)}},{key:"_computeContentWidth",value:function(e){var t=this._configuration.options,n=t.get(118),r=t.get(36);if(n.isViewportWrapping){var i=t.get(117),o=t.get(56);return e>i.contentWidth+r.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}var a=t.get(85)*r.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+a,s)}},{key:"setMaxLineWidth",value:function(e){var t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new nr(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}},{key:"saveState",value:function(){var e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}}},{key:"changeWhitespace",value:function(e){var t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}},{key:"isAfterLines",value:function(e){return this._linesLayout.isAfterLines(e)}},{key:"getLineNumberAtVerticalOffset",value:function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}},{key:"getWhitespaceAtVerticalOffset",value:function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}},{key:"getLinesViewportData",value:function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}},{key:"getLinesViewportDataAtScrollTop",value:function(e){var 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)}},{key:"getWhitespaceViewportData",value:function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}},{key:"getWhitespaces",value:function(){return this._linesLayout.getWhitespaces()}},{key:"getContentWidth",value:function(){return this._scrollable.getScrollDimensions().contentWidth}},{key:"getScrollWidth",value:function(){return this._scrollable.getScrollDimensions().scrollWidth}},{key:"getContentHeight",value:function(){return this._scrollable.getScrollDimensions().contentHeight}},{key:"getScrollHeight",value:function(){return this._scrollable.getScrollDimensions().scrollHeight}},{key:"getCurrentScrollLeft",value:function(){return this._scrollable.getCurrentScrollPosition().scrollLeft}},{key:"getCurrentScrollTop",value:function(){return this._scrollable.getCurrentScrollPosition().scrollTop}},{key:"validateScrollPosition",value:function(e){return this._scrollable.validateScrollPosition(e)}},{key:"setScrollPosition",value:function(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}},{key:"deltaScrollNow",value:function(e,t){var n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}]),n}(m.a),or=n(45),ar=n(269),sr=function e(t,n){Object(u.a)(this,e),this.outputLineIndex=t,this.outputOffset=n},lr=function(){function e(t,n,r){Object(u.a)(this,e),this.breakOffsets=t,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=r}return Object(d.a)(e,null,[{key:"getInputOffsetOfOutputPosition",value:function(e,t,n){return 0===t?n:e[t-1]+n}},{key:"getOutputPositionOfInputOffset",value:function(e,t){for(var n=0,r=e.length-1,i=0,o=0;n<=r;){var a=e[i=n+(r-n)/2|0];if(t<(o=i>0?e[i-1]:0))r=i-1;else{if(!(t>=a))break;n=i+1}}return new sr(i,t-o)}}]),e}(),cr=function(){function e(t){Object(u.a)(this,e),this._lines=t}return Object(d.a)(e,[{key:"convertViewPositionToModelPosition",value:function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}},{key:"convertViewRangeToModelRange",value:function(e){return this._lines.convertViewRangeToModelRange(e)}},{key:"validateViewPosition",value:function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}},{key:"validateViewRange",value:function(e,t){return this._lines.validateViewRange(e,t)}},{key:"convertModelPositionToViewPosition",value:function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}},{key:"convertModelRangeToViewRange",value:function(e){return this._lines.convertModelRangeToViewRange(e)}},{key:"modelPositionIsVisible",value:function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}}]),e}(),ur=function(){function e(t){Object(u.a)(this,e),this._counts=t,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}return Object(d.a)(e,[{key:"_invalidate",value:function(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}},{key:"_ensureValid",value:function(){if(!this._isValid){for(var e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=r+n;for(var i=0;i0?this._modelToView[t-1]:0;return new ar.b(t,e-n)}}]),e}(),dr=function(){function e(t,n,r,i,o,a,s,l){Object(u.a)(this,e),this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=r,this.fontInfo=i,this.tabSize=o,this.wrappingStrategy=a,this.wrappingColumn=s,this.wrappingIndent=l,this._constructLines(!0,null)}return Object(d.a)(e,[{key:"dispose",value:function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}},{key:"createCoordinatesConverter",value:function(){return new cr(this)}},{key:"_constructLines",value:function(e,t){var n=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var r=this.model.getLinesContent(),i=r.length,o=this.createLineBreaksComputer(),a=0;a=u&&g<=d,v=_r(s[p],!m);l[p]=v.getViewLineCount(),this.lines[p]=v}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new ur(l)}},{key:"getHiddenAreas",value:function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))}},{key:"_reduceRanges",value:function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(ue.a.compareRangesUsingStarts),r=[],i=n[0].startLineNumber,o=n[0].endLineNumber,a=1,s=n.length;ao+1?(r.push(new ue.a(i,1,o,1)),i=l.startLineNumber,o=l.endLineNumber):l.endLineNumber>o&&(o=l.endLineNumber)}return r.push(new ue.a(i,1,o,1)),r}},{key:"setHiddenAreas",value:function(e){var t=this,n=this._reduceRanges(e),r=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(ue.a.compareRangesUsingStarts);if(n.length===r.length){for(var o=!1,a=0;a=h&&_<=f?this.lines[v].isVisible()&&(this.lines[v]=this.lines[v].setVisible(!1),b=!0):(m=!0,this.lines[v].isVisible()||(this.lines[v]=this.lines[v].setVisible(!0),b=!0)),b){var y=this.lines[v].getViewLineCount();this.prefixSumComputer.changeValue(v,y)}}return m||this.setHiddenAreas([]),!0}},{key:"modelPositionIsVisible",value:function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}},{key:"setTabSize",value:function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}},{key:"setWrappingSettings",value:function(e,t,n,r){var i=this.fontInfo.equals(e),o=this.wrappingStrategy===t,a=this.wrappingColumn===n,s=this.wrappingIndent===r;if(i&&o&&a&&s)return!1;var l=i&&o&&!a&&s;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=r;var c=null;if(l){c=[];for(var u=0,d=this.lines.length;ua?(f=(h=(c=(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(i-a)-1,s=!0):it?t:0|e}},{key:"getActiveIndentGuide",value:function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var r=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),a=this.model.getActiveIndentGuide(r.lineNumber,i.lineNumber,o.lineNumber),s=this.convertModelPositionToViewPosition(a.startLineNumber,1),l=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:s.lineNumber,endLineNumber:l.lineNumber,indent:a.indent}}},{key:"getViewLinesIndentGuides",value:function(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),i=[],o=[],a=[],s=n.lineNumber-1,l=r.lineNumber-1,c=null,u=s;u<=l;u++){var d=this.lines[u];if(d.isVisible()){var h=d.getViewLineNumberOfModelPosition(0,u===s?n.column:1),f=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(u+1)),p=f-h+1,g=0;p>1&&1===d.getViewLineMinColumn(this.model,u+1,f)&&(g=0===h?1:2),o.push(p),a.push(g),null===c&&(c=new ce.a(u+1,0))}else null!==c&&(i=i.concat(this.model.getLinesIndentGuides(c.lineNumber,u)),c=null)}null!==c&&(i=i.concat(this.model.getLinesIndentGuides(c.lineNumber,r.lineNumber)),c=null);for(var m=t-e+1,v=new Array(m),_=0,b=0,y=i.length;bt&&(f=!0,h=t-i+1);var p=d+h;if(u.getViewLinesData(this.model,l+1,d,p,i-e,n,s),i+=h,f)break}}return s}},{key:"validateViewPosition",value:function(e,t,n){e=this._toValidViewLineNumber(e);var r=this.prefixSumComputer.getIndexOf(e-1),i=r.index,o=r.remainder,a=this.lines[i],s=a.getViewLineMinColumn(this.model,i+1,o),l=a.getViewLineMaxColumn(this.model,i+1,o);tl&&(t=l);var c=a.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new ce.a(i+1,c)).equals(n)?new ce.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}},{key:"validateViewRange",value:function(e,t){var n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),r=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new ue.a(n.lineNumber,n.column,r.lineNumber,r.column)}},{key:"convertViewPositionToModelPosition",value:function(e,t){e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),r=n.index,i=n.remainder,o=this.lines[r].getModelColumnOfViewPosition(i,t);return this.model.validatePosition(new ce.a(r+1,o))}},{key:"convertViewRangeToModelRange",value:function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ue.a(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"convertModelPositionToViewPosition",value:function(e,t){for(var n=this.model.validatePosition(new ce.a(e,t)),r=n.lineNumber,i=n.column,o=r-1,a=!1;o>0&&!this.lines[o].isVisible();)o--,a=!0;if(0===o&&!this.lines[o].isVisible())return new ce.a(1,1);var s=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return a?this.lines[o].getViewPositionOfModelPosition(s,this.model.getLineMaxColumn(o+1)):this.lines[r-1].getViewPositionOfModelPosition(s,i)}},{key:"convertModelRangeToViewRange",value:function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new ue.a(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new ue.a(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"_getViewLineNumberForModelPosition",value:function(e,t){var n=e-1;if(this.lines[n].isVisible()){var r=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}},{key:"getAllOverviewRulerDecorations",value:function(e,t,n){var r,o=this.model.getOverviewRulerDecorations(e,t),a=new Sr,s=Object(i.a)(o);try{for(s.s();!(r=s.n()).done;){var l=r.value,c=l.options.overviewRuler,u=c?c.position:0;if(0!==u){var d=c.getColor(n),h=this._getViewLineNumberForModelPosition(l.range.startLineNumber,l.range.startColumn),f=this._getViewLineNumberForModelPosition(l.range.endLineNumber,l.range.endColumn);a.accept(d,h,f,u)}}}catch(p){s.e(p)}finally{s.f()}return a.result}},{key:"getDecorationsInRange",value:function(e,t,n){var r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ue.a(r.lineNumber,1,o.lineNumber,o.column),t,n);for(var a=[],s=r.lineNumber-1,l=o.lineNumber-1,c=null,u=s;u<=l;u++){if(this.lines[u].isVisible())null===c&&(c=new ce.a(u+1,u===s?r.column:1));else if(null!==c){var d=this.model.getLineMaxColumn(u);a=a.concat(this.model.getDecorationsInRange(new ue.a(c.lineNumber,c.column,u,d),t,n)),c=null}}null!==c&&(a=a.concat(this.model.getDecorationsInRange(new ue.a(c.lineNumber,c.column,o.lineNumber,o.column),t,n)),c=null),a.sort((function(e,t){var n=ue.a.compareRangesUsingStarts(e.range,t.range);return 0===n?e.idt.id?1:0:n}));var h,f=[],p=0,g=null,m=Object(i.a)(a);try{for(m.s();!(h=m.n()).done;){var v=h.value,_=v.id;g!==_&&(g=_,f[p++]=v)}}catch(b){m.e(b)}finally{m.f()}return f}}]),e}(),hr=function(){function e(){Object(u.a)(this,e)}return Object(d.a)(e,[{key:"isVisible",value:function(){return!0}},{key:"setVisible",value:function(e){return e?this:fr.INSTANCE}},{key:"getLineBreakData",value:function(){return null}},{key:"getViewLineCount",value:function(){return 1}},{key:"getViewLineContent",value:function(e,t,n){return e.getLineContent(t)}},{key:"getViewLineLength",value:function(e,t,n){return e.getLineLength(t)}},{key:"getViewLineMinColumn",value:function(e,t,n){return e.getLineMinColumn(t)}},{key:"getViewLineMaxColumn",value:function(e,t,n){return e.getLineMaxColumn(t)}},{key:"getViewLineData",value:function(e,t,n){var r=e.getLineTokens(t),i=r.getLineContent();return new Ot.c(i,!1,1,i.length+1,0,r.inflate())}},{key:"getViewLinesData",value:function(e,t,n,r,i,o,a){o[i]?a[i]=this.getViewLineData(e,t,0):a[i]=null}},{key:"getModelColumnOfViewPosition",value:function(e,t){return t}},{key:"getViewPositionOfModelPosition",value:function(e,t){return new ce.a(e,t)}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){return e}}]),e}();hr.INSTANCE=new hr;var fr=function(){function e(){Object(u.a)(this,e)}return Object(d.a)(e,[{key:"isVisible",value:function(){return!1}},{key:"setVisible",value:function(e){return e?hr.INSTANCE:this}},{key:"getLineBreakData",value:function(){return null}},{key:"getViewLineCount",value:function(){return 0}},{key:"getViewLineContent",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineLength",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineMinColumn",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineMaxColumn",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineData",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLinesData",value:function(e,t,n,r,i,o,a){throw new Error("Not supported")}},{key:"getModelColumnOfViewPosition",value:function(e,t){throw new Error("Not supported")}},{key:"getViewPositionOfModelPosition",value:function(e,t){throw new Error("Not supported")}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){throw new Error("Not supported")}}]),e}();fr.INSTANCE=new fr;var pr=function(){function e(t,n){Object(u.a)(this,e),this._lineBreakData=t,this._isVisible=n}return Object(d.a)(e,[{key:"isVisible",value:function(){return this._isVisible}},{key:"setVisible",value:function(e){return this._isVisible=e,this}},{key:"getLineBreakData",value:function(){return this._lineBreakData}},{key:"getViewLineCount",value:function(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}},{key:"getInputStartOffsetOfOutputLineIndex",value:function(e){return lr.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}},{key:"getInputEndOffsetOfOutputLineIndex",value:function(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:lr.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,n+1,0)}},{key:"getViewLineContent",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n),o=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:i+1});return n>0&&(o=mr(this._lineBreakData.wrappedTextIndentLength)+o),o}},{key:"getViewLineLength",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-r;return n>0&&(i=this._lineBreakData.wrappedTextIndentLength+i),i}},{key:"getViewLineMinColumn",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1}},{key:"getViewLineMaxColumn",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1}},{key:"getViewLineData",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n),o=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:i+1});n>0&&(o=mr(this._lineBreakData.wrappedTextIndentLength)+o);var a=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,s=o.length+1,l=n+10&&(c=this._lineBreakData.wrappedTextIndentLength);var u=e.getLineTokens(t),d=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new Ot.c(o,l,a,s,d,u.sliceAndInflate(r,i,c))}},{key:"getViewLinesData",value:function(e,t,n,r,i,o,a){if(!this._isVisible)throw new Error("Not supported");for(var s=n;s0&&(n0&&(i+=this._lineBreakData.wrappedTextIndentLength),new ce.a(e+r,i)}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+lr.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}}]),e}(),gr=[""];function mr(e){if(e>=gr.length)for(var t=1;t<=e;t++)gr[t]=vr(t);return gr[e]}function vr(e){return new Array(e+1).join(" ")}function _r(e,t){return null===e?t?hr.INSTANCE:fr.INSTANCE:new pr(e,t)}var br=function(){function e(t){Object(u.a)(this,e),this._lines=t}return Object(d.a)(e,[{key:"_validPosition",value:function(e){return this._lines.model.validatePosition(e)}},{key:"_validRange",value:function(e){return this._lines.model.validateRange(e)}},{key:"convertViewPositionToModelPosition",value:function(e){return this._validPosition(e)}},{key:"convertViewRangeToModelRange",value:function(e){return this._validRange(e)}},{key:"validateViewPosition",value:function(e,t){return this._validPosition(t)}},{key:"validateViewRange",value:function(e,t){return this._validRange(t)}},{key:"convertModelPositionToViewPosition",value:function(e){return this._validPosition(e)}},{key:"convertModelRangeToViewRange",value:function(e){return this._validRange(e)}},{key:"modelPositionIsVisible",value:function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}}]),e}(),yr=function(){function e(t){Object(u.a)(this,e),this.model=t}return Object(d.a)(e,[{key:"dispose",value:function(){}},{key:"createCoordinatesConverter",value:function(){return new br(this)}},{key:"getHiddenAreas",value:function(){return[]}},{key:"setHiddenAreas",value:function(e){return!1}},{key:"setTabSize",value:function(e){return!1}},{key:"setWrappingSettings",value:function(e,t,n,r){return!1}},{key:"createLineBreaksComputer",value:function(){var e=[];return{addRequest:function(t,n){e.push(null)},finalize:function(){return e}}}},{key:"onModelFlushed",value:function(){}},{key:"onModelLinesDeleted",value:function(e,t,n){return new xn(t,n)}},{key:"onModelLinesInserted",value:function(e,t,n,r){return new Nn(t,n)}},{key:"onModelLineChanged",value:function(e,t,n){return[!1,new Tn(t,t),null,null]}},{key:"acceptVersionId",value:function(e){}},{key:"getViewLineCount",value:function(){return this.model.getLineCount()}},{key:"getActiveIndentGuide",value:function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}},{key:"getViewLinesIndentGuides",value:function(e,t){for(var n=t-e+1,r=new Array(n),i=0;i=t)return void(n>a&&(i[i.length-1]=n));i.push(r,t,n)}else this.result[e]=[r,t,n]}}]),e}(),Cr=function(){function e(t,n,r,i,o){Object(u.a)(this,e),this.editorId=t,this.model=n,this.configuration=r,this._linesCollection=i,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return Object(d.a)(e,[{key:"_clearCachedModelDecorationsResolver",value:function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}},{key:"dispose",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"reset",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"onModelDecorationsChanged",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"onLineMappingChanged",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"_getOrCreateViewModelDecoration",value:function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var r,i=e.range,o=e.options;if(o.isWholeLine){var a=this._coordinatesConverter.convertModelPositionToViewPosition(new ce.a(i.startLineNumber,1)),s=this._coordinatesConverter.convertModelPositionToViewPosition(new ce.a(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));r=new ue.a(a.lineNumber,a.column,s.lineNumber,s.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Ot.e(r,o),this._decorationsCache[t]=n}return n}},{key:"getDecorationsViewportData",value:function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}},{key:"_getDecorationsViewportData",value:function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object(Q.l)(this.configuration.options)),n=e.startLineNumber,r=e.endLineNumber,i=[],o=0,a=[],s=n;s<=r;s++)a[s-n]=[];for(var l=0,c=t.length;l=2&&e._viewportStartLineTrackedRange){var L=e.model._getTrackedRange(e._viewportStartLineTrackedRange);if(L){var A=e.coordinatesConverter.convertModelPositionToViewPosition(L.getStartPosition()),I=e.viewLayout.getVerticalOffsetForLineNumber(A.lineNumber);e.viewLayout.setScrollPosition({scrollTop:I+e._viewportStartLineDelta},1)}}try{var R=e._eventDispatcher.beginEmitViewEvents();e._cursor.onModelContentChanged(R,t)}finally{e._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],r=0,i=t.ranges.length;rs||(o0&&c[d-1]===c[d]||(u+=this.model.getLineContent(c[d])+r);return u}if(a&&t){var h,f=[],p=0,g=Object(i.a)(e);try{for(g.s();!(h=g.n()).done;){var m=h.value,v=m.startLineNumber;m.isEmpty()?v!==p&&f.push(this.model.getLineContent(v)):f.push(this.model.getValueInRange(m,n?2:0)),p=v}}catch(C){g.e(C)}finally{g.f()}return 1===f.length?f[0]:f}var _,b=[],y=Object(i.a)(e);try{for(y.s();!(_=y.n()).done;){var S=_.value;S.isEmpty()||b.push(this.model.getValueInRange(S,n?2:0))}}catch(C){y.e(C)}finally{y.f()}return 1===b.length?b[0]:b}},{key:"getRichTextToCopy",value:function(e,t){var n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;var r=e[0];if(r.isEmpty()){if(!t)return null;var i=r.startLineNumber;r=new ue.a(i,this.model.getLineMinColumn(i),i,this.model.getLineMaxColumn(i))}var o=this._configuration.options.get(36),a=this._getColorMap(),s=o.fontFamily===Q.c.fontFamily?o.fontFamily:"'".concat(o.fontFamily,"', ").concat(Q.c.fontFamily);return{mode:n.language,html:'
'+this._getHTMLToCopy(r,a)+"
"}}},{key:"_getHTMLToCopy",value:function(e,t){for(var n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,o=e.endColumn,a=this.getTabSize(),s="",l=n;l<=i;l++){var c=this.model.getLineTokens(l),u=c.getLineContent(),d=l===n?r-1:0,h=l===i?o-1:u.length;s+=""===u?"
":Object(Zn.a)(u,c.inflate(),t,d,h,a,k.i)}return s}},{key:"_getColorMap",value:function(){var e=Et.C.getColorMap(),t=["#000000"];if(e)for(var n=1,r=e.length;n=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}}]),n}(n(131).a),Ar=[],Ir=[],Rr=function(){function e(t,n){Object(u.a)(this,e),this.classifier=new Lr(t,n)}return Object(d.a)(e,[{key:"createLineBreaksComputer",value:function(e,t,n,r){var i=this;t|=0,n=+n;var o=[],a=[];return{addRequest:function(e,t){o.push(e),a.push(t)},finalize:function(){for(var s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[],c=0,u=o.length;c=0)for(var y=Math.abs(c[b]-v);b+1<_;){var S=Math.abs(c[b+1]-v);if(S>=y)break;y=S,b++}for(;b<_;){var C=b<0?0:l[b],k=b<0?0:c[b];g>C&&(C=g,k=m);var E=0,w=0,O=0,T=0;if(k<=v){for(var x=k,N=0===C?0:n.charCodeAt(C-1),D=0===C?0:e.get(N),L=!0,A=C;Ag&&Br(N,D,R,M)&&(E=I,w=x),(x+=P)>v){I>g?(O=I,T=x-P):(O=A+1,T=x),x-w>d&&(E=0),L=!1;break}N=R,D=M}if(L){p>0&&(h[p]=l[l.length-1],f[p]=c[l.length-1],p++);break}}if(0===E){for(var j=k,F=n.charCodeAt(C),B=e.get(F),U=!1,H=C-1;H>=g;H--){var z=H+1,V=n.charCodeAt(H);if(9===V){U=!0;break}var W=void 0,G=void 0;if(Ae.G(V)?(H--,W=0,G=2):(W=e.get(V),G=Ae.E(V)?o:1),j<=v){if(0===O&&(O=z,T=j),j<=v-d)break;if(Br(V,W,F,B)){E=z,w=j;break}}j-=G,F=V,B=W}if(0!==E){var q=d-(T-w);if(q<=r){var K=n.charCodeAt(O);q-(Ae.F(K)?2:jr(K,T,r,o))<0&&(E=0)}}if(U){b--;continue}}for(0===E&&(E=O,w=T),g=E,h[p]=E,m=w,f[p]=w,p++,v=w+d;b<0||b<_&&c[b]=Y)break;Y=$,b++}}return 0===p?null:(h.length=p,f.length=p,Ar=t.breakOffsets,Ir=t.breakOffsetsVisibleColumn,t.breakOffsets=h,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=u,t)}function Pr(e,t,n,r,i,o){if(-1===r)return null;var a=t.length;if(a<=1)return null;var s=Ur(t,n,r,i,o),l=r-s,c=[],u=[],d=0,h=0,f=0,p=r,g=t.charCodeAt(0),m=e.get(g),v=jr(g,0,n,i),_=1;Ae.F(g)&&(v+=1,g=t.charCodeAt(1),m=e.get(g),_++);for(var b=_;bp&&((0===h||v-f>l)&&(h=y,f=v-k),c[d]=h,u[d]=f,d++,p=f+l,h=0),g=S,m=C}return 0===d?null:(c[d]=a,u[d]=v,new lr(c,u,s))}function jr(e,t,n,r){return 9===e?n-t%n:Ae.E(e)?r:1}function Fr(e,t){return t-e%t}function Br(e,t,n,r){return 32!==n&&(2===t||3===t&&2!==r||1===r||3===r&&1!==t)}function Ur(e,t,n,r,i){var o=0;if(0!==i){var a=Ae.w(e);if(-1!==a){for(var s=0;sn&&(o=0)}}return o}var Hr=function(){function e(){Object(u.a)(this,e)}return Object(d.a)(e,null,[{key:"create",value:function(){return new e}}]),Object(d.a)(e,[{key:"createLineBreaksComputer",value:function(e,t,n,r){t|=0,n=+n;var i=[];return{addRequest:function(e,t){i.push(e)},finalize:function(){return function(e,t,n,r,i){if(-1===r){for(var o=[],a=0,s=e.length;al?(b=0,y=0):S=l-k}var E=v.substr(b),w=zr(E,y,n,S,u);d[m]=b,h[m]=y,f[m]=E,p[m]=w[0],g[m]=w[1]}c.innerHTML=u.build(),c.style.position="absolute",c.style.top="10000",c.style.wordWrap="break-word",document.body.appendChild(c);for(var O=document.createRange(),T=Array.prototype.slice.call(c.children,0),x=[],N=0;N');var o=e.length,a=t,s=0,l=[],c=[],u=0");for(var d=0;d"),l[d]=s,c[d]=a;var h=u;u=d+1"),l[e.length]=s,c[e.length]=a,i.appendASCIIString(""),[l,c]}function Vr(e,t,n,r){if(n.length<=1)return null;var i=Array.prototype.slice.call(t.children,0),o=[];try{Wr(e,i,r,0,null,n.length-1,null,o)}catch(a){return console.log(a),null}return 0===o.length?null:(o.push(n.length),o)}function Wr(e,t,n,r,i,o,a,s){if(r!==o&&(i=i||Gr(e,t,n[r],n[r+1]),a=a||Gr(e,t,n[o],n[o+1]),!(Math.abs(i[0].top-a[0].top)<=.1)))if(r+1!==o){var l=r+(o-r)/2|0,c=Gr(e,t,n[l],n[l+1]);Wr(e,t,n,r,i,l,c,s),Wr(e,t,n,l,c,o,a,s)}else s.push(o)}function Gr(e,t,n,r){return e.setStart(t[n/16384|0].firstChild,n%16384),e.setEnd(t[r/16384|0].firstChild,r%16384),e.getClientRects()}var qr=n(142),Kr=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Yr=function(e,t){return function(n,r){t(n,r,e)}},$r=0,Qr=function(){function e(t,n,r,i,o){Object(u.a)(this,e),this.model=t,this.viewModel=n,this.view=r,this.hasRealView=i,this.listenersToRemove=o}return Object(d.a)(e,[{key:"dispose",value:function(){Object(m.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}]),e}(),Zr=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r,a,s,l,c,d,h,f,m){var v,_;Object(u.a)(this,n),(v=t.call(this))._onDidDispose=v._register(new g.a),v.onDidDispose=v._onDidDispose.event,v._onDidChangeModelContent=v._register(new g.a),v.onDidChangeModelContent=v._onDidChangeModelContent.event,v._onDidChangeModelLanguage=v._register(new g.a),v.onDidChangeModelLanguage=v._onDidChangeModelLanguage.event,v._onDidChangeModelLanguageConfiguration=v._register(new g.a),v.onDidChangeModelLanguageConfiguration=v._onDidChangeModelLanguageConfiguration.event,v._onDidChangeModelOptions=v._register(new g.a),v.onDidChangeModelOptions=v._onDidChangeModelOptions.event,v._onDidChangeModelDecorations=v._register(new g.a),v.onDidChangeModelDecorations=v._onDidChangeModelDecorations.event,v._onDidChangeConfiguration=v._register(new g.a),v.onDidChangeConfiguration=v._onDidChangeConfiguration.event,v._onDidChangeModel=v._register(new g.a),v.onDidChangeModel=v._onDidChangeModel.event,v._onDidChangeCursorPosition=v._register(new g.a),v.onDidChangeCursorPosition=v._onDidChangeCursorPosition.event,v._onDidChangeCursorSelection=v._register(new g.a),v.onDidChangeCursorSelection=v._onDidChangeCursorSelection.event,v._onDidAttemptReadOnlyEdit=v._register(new g.a),v.onDidAttemptReadOnlyEdit=v._onDidAttemptReadOnlyEdit.event,v._onDidLayoutChange=v._register(new g.a),v.onDidLayoutChange=v._onDidLayoutChange.event,v._editorTextFocus=v._register(new Xr),v.onDidFocusEditorText=v._editorTextFocus.onDidChangeToTrue,v.onDidBlurEditorText=v._editorTextFocus.onDidChangeToFalse,v._editorWidgetFocus=v._register(new Xr),v.onDidFocusEditorWidget=v._editorWidgetFocus.onDidChangeToTrue,v.onDidBlurEditorWidget=v._editorWidgetFocus.onDidChangeToFalse,v._onWillType=v._register(new g.a),v.onWillType=v._onWillType.event,v._onDidType=v._register(new g.a),v.onDidType=v._onDidType.event,v._onDidCompositionStart=v._register(new g.a),v.onDidCompositionStart=v._onDidCompositionStart.event,v._onDidCompositionEnd=v._register(new g.a),v.onDidCompositionEnd=v._onDidCompositionEnd.event,v._onDidPaste=v._register(new g.a),v.onDidPaste=v._onDidPaste.event,v._onMouseUp=v._register(new g.a),v.onMouseUp=v._onMouseUp.event,v._onMouseDown=v._register(new g.a),v.onMouseDown=v._onMouseDown.event,v._onMouseDrag=v._register(new g.a),v.onMouseDrag=v._onMouseDrag.event,v._onMouseDrop=v._register(new g.a),v.onMouseDrop=v._onMouseDrop.event,v._onContextMenu=v._register(new g.a),v.onContextMenu=v._onContextMenu.event,v._onMouseMove=v._register(new g.a),v.onMouseMove=v._onMouseMove.event,v._onMouseLeave=v._register(new g.a),v.onMouseLeave=v._onMouseLeave.event,v._onMouseWheel=v._register(new g.a),v.onMouseWheel=v._onMouseWheel.event,v._onKeyUp=v._register(new g.a),v.onKeyUp=v._onKeyUp.event,v._onKeyDown=v._register(new g.a),v.onKeyDown=v._onKeyDown.event,v._onDidContentSizeChange=v._register(new g.a),v.onDidContentSizeChange=v._onDidContentSizeChange.event,v._onDidScrollChange=v._register(new g.a),v.onDidScrollChange=v._onDidScrollChange.event,v._onDidChangeViewZones=v._register(new g.a),v.onDidChangeViewZones=v._onDidChangeViewZones.event,r=r||{},v._domElement=e,v._overflowWidgetsDomNode=r.overflowWidgetsDomNode,v._id=++$r,v._decorationTypeKeysToIds={},v._decorationTypeSubtypes={},v.isSimpleWidget=a.isSimpleWidget||!1,v._telemetryData=a.telemetryData,v._configuration=v._register(v._createConfiguration(r,m)),v._register(v._configuration.onDidChange((function(e){v._onDidChangeConfiguration.fire(e);var t=v._configuration.options;if(e.hasChanged(117)){var n=t.get(117);v._onDidLayoutChange.fire(n)}}))),v._contextKeyService=v._register(d.createScoped(v._domElement)),v._notificationService=f,v._codeEditorService=l,v._commandService=c,v._themeService=h,v._register(new Jr(Object(o.a)(v),v._contextKeyService)),v._register(new ei(Object(o.a)(v),v._contextKeyService)),v._instantiationService=s.createChild(new Tr.a([wr.b,v._contextKeyService])),v._modelData=null,v._contributions={},v._actions={},v._focusTracker=new ti(e),v._focusTracker.onChange((function(){v._editorWidgetFocus.setValue(v._focusTracker.hasFocus())})),v._contentWidgets={},v._overlayWidgets={},_=Array.isArray(a.contributions)?a.contributions:b.d.getEditorContributions();var y,S=Object(i.a)(_);try{for(S.s();!(y=S.n()).done;){var C=y.value;try{var k=v._instantiationService.createInstance(C.ctor,Object(o.a)(v));v._contributions[C.id]=k}catch(E){Object(p.e)(E)}}}catch(E){S.e(E)}finally{S.f()}return b.d.getEditorActions().forEach((function(e){var t=new Yn.a(e.id,e.label,e.alias,Object(Dr.n)(e.precondition),(function(){return v._instantiationService.invokeFunction((function(t){return Promise.resolve(e.runEditorCommand(t,Object(o.a)(v),null))}))}),v._contextKeyService);v._actions[t.id]=t})),v._codeEditorService.addCodeEditor(Object(o.a)(v)),v}return Object(d.a)(n,[{key:"_createConfiguration",value:function(e,t){return new _.a(this.isSimpleWidget,e,this._domElement,t)}},{key:"getId",value:function(){return this.getEditorType()+":"+this._id}},{key:"getEditorType",value:function(){return $n.a.ICodeEditor}},{key:"dispose",value:function(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();for(var e=Object.keys(this._contributions),t=0,r=e.length;t0&&void 0!==arguments[0]?arguments[0]:null;if(!this._modelData)return"";var t=!(!e||!e.preserveBOM),n=0;return e&&e.lineEnding&&"\n"===e.lineEnding?n=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=2),this._modelData.model.getValue(n,t)}},{key:"setValue",value:function(e){this._modelData&&this._modelData.model.setValue(e)}},{key:"getModel",value:function(){return this._modelData?this._modelData.model:null}},{key:"setModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e;if((null!==this._modelData||null!==t)&&(!this._modelData||this._modelData.model!==t)){var n=this.hasTextFocus(),r=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();var i={oldModelUrl:r?r.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(r)}}},{key:"_removeDecorationTypes",value:function(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(var e in this._decorationTypeSubtypes){var t=this._decorationTypeSubtypes[e];for(var n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}},{key:"getVisibleRanges",value:function(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}},{key:"getVisibleRangesPlusViewportAboveBelow",value:function(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}},{key:"getWhitespaces",value:function(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}},{key:"getTopForLineNumber",value:function(e){return this._modelData?n._getVerticalOffsetForPosition(this._modelData,e,1):-1}},{key:"getTopForPosition",value:function(e,t){return this._modelData?n._getVerticalOffsetForPosition(this._modelData,e,t):-1}},{key:"setHiddenAreas",value:function(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map((function(e){return ue.a.lift(e)})))}},{key:"getVisibleColumnFromPosition",value:function(e){if(!this._modelData)return e.column;var t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return de.a.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}},{key:"getPosition",value:function(){return this._modelData?this._modelData.viewModel.getPosition():null}},{key:"setPosition",value:function(e){if(this._modelData){if(!ce.a.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}},{key:"_sendRevealRange",value:function(e,t,n,r){if(this._modelData){if(!ue.a.isIRange(e))throw new Error("Invalid arguments");var i=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(i);this._modelData.viewModel.revealRange("api",n,o,t,r)}}},{key:"revealLine",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,0,t)}},{key:"revealLineInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,1,t)}},{key:"revealLineInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,2,t)}},{key:"revealLineNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,5,t)}},{key:"_revealLine",value:function(e,t,n){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new ue.a(e,1,e,1),t,!1,n)}},{key:"revealPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,0,!0,t)}},{key:"revealPositionInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,1,!0,t)}},{key:"revealPositionInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,2,!0,t)}},{key:"revealPositionNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,5,!0,t)}},{key:"_revealPosition",value:function(e,t,n,r){if(!ce.a.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ue.a(e.lineNumber,e.column,e.lineNumber,e.column),t,n,r)}},{key:"getSelection",value:function(){return this._modelData?this._modelData.viewModel.getSelection():null}},{key:"getSelections",value:function(){return this._modelData?this._modelData.viewModel.getSelections():null}},{key:"setSelection",value:function(e){var t=S.a.isISelection(e),n=ue.a.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){var r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r)}}},{key:"_setSelectionImpl",value:function(e){if(this._modelData){var t=new S.a(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}}},{key:"revealLines",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,0,n)}},{key:"revealLinesInCenter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,1,n)}},{key:"revealLinesInCenterIfOutsideViewport",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,2,n)}},{key:"revealLinesNearTop",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,5,n)}},{key:"_revealLines",value:function(e,t,n,r){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new ue.a(e,1,t,1),n,!1,r)}},{key:"revealRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._revealRange(e,n?1:0,r,t)}},{key:"revealRangeInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,1,!0,t)}},{key:"revealRangeInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,2,!0,t)}},{key:"revealRangeNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,5,!0,t)}},{key:"revealRangeNearTopIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,6,!0,t)}},{key:"revealRangeAtTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,3,!0,t)}},{key:"_revealRange",value:function(e,t,n,r){if(!ue.a.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ue.a.lift(e),t,n,r)}},{key:"setSelections",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(var n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:1;if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}},{key:"setScrollTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}},{key:"setScrollPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}},{key:"saveViewState",value:function(){if(!this._modelData)return null;for(var e={},t=0,n=Object.keys(this._contributions);t0&&void 0!==arguments[0]&&arguments[0];this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}},{key:"setAriaOptions",value:function(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}},{key:"applyFontInfo",value:function(e){_.a.applyFontInfoSlow(e,this._configuration.options.get(36))}},{key:"_attachModel",value:function(e){var t=this;if(e){var n=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();var i=new kr(this._id,this._configuration,e,Hr.create(),Rr.create(this._configuration.options),(function(e){return f.scheduleAtNextAnimationFrame(e)}));n.push(e.onDidChangeDecorations((function(e){return t._onDidChangeModelDecorations.fire(e)}))),n.push(e.onDidChangeLanguage((function(n){t._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),t._onDidChangeModelLanguage.fire(n)}))),n.push(e.onDidChangeLanguageConfiguration((function(e){return t._onDidChangeModelLanguageConfiguration.fire(e)}))),n.push(e.onDidChangeContent((function(e){return t._onDidChangeModelContent.fire(e)}))),n.push(e.onDidChangeOptions((function(e){return t._onDidChangeModelOptions.fire(e)}))),n.push(e.onWillDispose((function(){return t.setModel(null)}))),n.push(i.onEvent((function(e){switch(e.kind){case 0:t._onDidContentSizeChange.fire(e);break;case 1:t._editorTextFocus.setValue(e.hasFocus);break;case 2:t._onDidScrollChange.fire(e);break;case 3:t._onDidChangeViewZones.fire();break;case 4:t._onDidAttemptReadOnlyEdit.fire();break;case 5:e.reachedMaxCursorCount&&t._notificationService.warn(h.a("cursors.maximum","The number of cursors has been limited to {0}.",qn.MAX_CURSOR_COUNT));for(var n=[],r=0,i=e.selections.length;r1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}},{key:"_updateFromFocus",value:function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}},{key:"_updateFromModel",value:function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}]),n}(m.a),ei=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(u.a)(this,n),(i=t.call(this))._editor=e,i._contextKeyService=r,i._langId=Qn.a.languageId.bindTo(r),i._hasCompletionItemProvider=Qn.a.hasCompletionItemProvider.bindTo(r),i._hasCodeActionsProvider=Qn.a.hasCodeActionsProvider.bindTo(r),i._hasCodeLensProvider=Qn.a.hasCodeLensProvider.bindTo(r),i._hasDefinitionProvider=Qn.a.hasDefinitionProvider.bindTo(r),i._hasDeclarationProvider=Qn.a.hasDeclarationProvider.bindTo(r),i._hasImplementationProvider=Qn.a.hasImplementationProvider.bindTo(r),i._hasTypeDefinitionProvider=Qn.a.hasTypeDefinitionProvider.bindTo(r),i._hasHoverProvider=Qn.a.hasHoverProvider.bindTo(r),i._hasDocumentHighlightProvider=Qn.a.hasDocumentHighlightProvider.bindTo(r),i._hasDocumentSymbolProvider=Qn.a.hasDocumentSymbolProvider.bindTo(r),i._hasReferenceProvider=Qn.a.hasReferenceProvider.bindTo(r),i._hasRenameProvider=Qn.a.hasRenameProvider.bindTo(r),i._hasSignatureHelpProvider=Qn.a.hasSignatureHelpProvider.bindTo(r),i._hasDocumentFormattingProvider=Qn.a.hasDocumentFormattingProvider.bindTo(r),i._hasDocumentSelectionFormattingProvider=Qn.a.hasDocumentSelectionFormattingProvider.bindTo(r),i._hasMultipleDocumentFormattingProvider=Qn.a.hasMultipleDocumentFormattingProvider.bindTo(r),i._hasMultipleDocumentSelectionFormattingProvider=Qn.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(r),i._isInWalkThrough=Qn.a.isInWalkThroughSnippet.bindTo(r);var o=function(){return i._update()};return i._register(e.onDidChangeModel(o)),i._register(e.onDidChangeModelLanguage(o)),i._register(Et.d.onDidChange(o)),i._register(Et.a.onDidChange(o)),i._register(Et.b.onDidChange(o)),i._register(Et.f.onDidChange(o)),i._register(Et.e.onDidChange(o)),i._register(Et.q.onDidChange(o)),i._register(Et.D.onDidChange(o)),i._register(Et.p.onDidChange(o)),i._register(Et.i.onDidChange(o)),i._register(Et.m.onDidChange(o)),i._register(Et.v.onDidChange(o)),i._register(Et.w.onDidChange(o)),i._register(Et.g.onDidChange(o)),i._register(Et.j.onDidChange(o)),i._register(Et.y.onDidChange(o)),o(),i}return Object(d.a)(n,[{key:"dispose",value:function(){Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"reset",value:function(){var e=this;this._contextKeyService.bufferChangeEvents((function(){e._langId.reset(),e._hasCompletionItemProvider.reset(),e._hasCodeActionsProvider.reset(),e._hasCodeLensProvider.reset(),e._hasDefinitionProvider.reset(),e._hasDeclarationProvider.reset(),e._hasImplementationProvider.reset(),e._hasTypeDefinitionProvider.reset(),e._hasHoverProvider.reset(),e._hasDocumentHighlightProvider.reset(),e._hasDocumentSymbolProvider.reset(),e._hasReferenceProvider.reset(),e._hasRenameProvider.reset(),e._hasDocumentFormattingProvider.reset(),e._hasDocumentSelectionFormattingProvider.reset(),e._hasSignatureHelpProvider.reset(),e._isInWalkThrough.reset()}))}},{key:"_update",value:function(){var e=this,t=this._editor.getModel();t?this._contextKeyService.bufferChangeEvents((function(){e._langId.set(t.getLanguageIdentifier().language),e._hasCompletionItemProvider.set(Et.d.has(t)),e._hasCodeActionsProvider.set(Et.a.has(t)),e._hasCodeLensProvider.set(Et.b.has(t)),e._hasDefinitionProvider.set(Et.f.has(t)),e._hasDeclarationProvider.set(Et.e.has(t)),e._hasImplementationProvider.set(Et.q.has(t)),e._hasTypeDefinitionProvider.set(Et.D.has(t)),e._hasHoverProvider.set(Et.p.has(t)),e._hasDocumentHighlightProvider.set(Et.i.has(t)),e._hasDocumentSymbolProvider.set(Et.m.has(t)),e._hasReferenceProvider.set(Et.v.has(t)),e._hasRenameProvider.set(Et.w.has(t)),e._hasSignatureHelpProvider.set(Et.y.has(t)),e._hasDocumentFormattingProvider.set(Et.g.has(t)||Et.j.has(t)),e._hasDocumentSelectionFormattingProvider.set(Et.j.has(t)),e._hasMultipleDocumentFormattingProvider.set(Et.g.all(t).length+Et.j.all(t).length>1),e._hasMultipleDocumentSelectionFormattingProvider.set(Et.j.all(t).length>1),e._isInWalkThrough.set(t.uri.scheme===v.b.walkThroughSnippet)})):this.reset()}}]),n}(m.a),ti=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this))._onChange=r._register(new g.a),r.onChange=r._onChange.event,r._hasFocus=!1,r._domFocusTracker=r._register(f.trackFocus(e)),r._register(r._domFocusTracker.onDidFocus((function(){r._hasFocus=!0,r._onChange.fire(void 0)}))),r._register(r._domFocusTracker.onDidBlur((function(){r._hasFocus=!1,r._onChange.fire(void 0)}))),r}return Object(d.a)(n,[{key:"hasFocus",value:function(){return this._hasFocus}}]),n}(m.a),ni=encodeURIComponent("");function ii(e){return ni+encodeURIComponent(e.toString())+ri}var oi=encodeURIComponent('');Object($.g)((function(e,t){var n=e.getColor(Tt.t);n&&t.addRule(".monaco-editor .".concat("squiggly-error"," { border-bottom: 4px double ",n,"; }"));var r=e.getColor(Tt.u);r&&t.addRule(".monaco-editor .".concat("squiggly-error",' { background: url("data:image/svg+xml,',ii(r),'") repeat-x bottom left; }'));var i=e.getColor(Tt.S);i&&t.addRule(".monaco-editor .".concat("squiggly-warning"," { border-bottom: 4px double ",i,"; }"));var o=e.getColor(Tt.T);o&&t.addRule(".monaco-editor .".concat("squiggly-warning",' { background: url("data:image/svg+xml,',ii(o),'") repeat-x bottom left; }'));var a=e.getColor(Tt.K);a&&t.addRule(".monaco-editor .".concat("squiggly-info"," { border-bottom: 4px double ",a,"; }"));var s=e.getColor(Tt.L);s&&t.addRule(".monaco-editor .".concat("squiggly-info",' { background: url("data:image/svg+xml,',ii(s),'") repeat-x bottom left; }'));var l=e.getColor(Tt.C);l&&t.addRule(".monaco-editor .".concat("squiggly-hint"," { border-bottom: 2px dotted ",l,"; }"));var c=e.getColor(Tt.D);c&&t.addRule(".monaco-editor .".concat("squiggly-hint",' { background: url("data:image/svg+xml,',oi+encodeURIComponent(c.toString())+ai,'") no-repeat bottom left; }'));var u=e.getColor(Pe.p);u&&t.addRule(".monaco-editor.showUnused .".concat("squiggly-inline-unnecessary"," { opacity: ",u.rgba.a,"; }"));var d=e.getColor(Pe.o);d&&t.addRule(".monaco-editor.showUnused .".concat("squiggly-unnecessary"," { border-bottom: 2px dashed ",d,"; }"));var h=e.getColor(Tt.B)||"inherit";t.addRule(".monaco-editor.showDeprecated .".concat("squiggly-inline-deprecated"," { text-decoration: line-through; text-decoration-color: ",h,"}"))}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(0),i=n(1),o=n(3);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l(t);return n.textContent=e,n}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l(t);return u(n,d(e),t.actionHandler),n}function l(e){var t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}var c=function(){function e(t){Object(r.a)(this,e),this.source=t,this.index=0}return Object(i.a)(e,[{key:"eos",value:function(){return this.index>=this.source.length}},{key:"next",value:function(){var e=this.peek();return this.advance(),e}},{key:"peek",value:function(){return this.source[this.index]}},{key:"advance",value:function(){this.index++}}]),e}();function u(e,t,n){var r;if(2===t.type)r=document.createTextNode(t.content||"");else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(5===t.type&&n){var i=document.createElement("a");i.href="#",n.disposeables.add(o.addStandardDisposableListener(i,"click",(function(e){n.callback(String(t.index),e)}))),r=i}else 7===t.type?r=document.createElement("br"):1===t.type&&(r=e);r&&e!==r&&e.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach((function(e){u(r,e,n)}))}function d(e){for(var t={type:1,children:[]},n=0,r=t,i=[],o=new c(e);!o.eos();){var a=o.next(),s="\\"===a&&0!==h(o.peek());if(s&&(a=o.next()),s||0===h(a)||a!==o.peek())if("\n"===a)2===r.type&&(r=i.pop()),r.children.push({type:7});else if(2!==r.type){var l={type:2,content:a};r.children.push(l),i.push(r),r=l}else r.content+=a;else{o.advance(),2===r.type&&(r=i.pop());var u=h(a);if(r.type===u||5===r.type&&6===u)r=i.pop();else{var d={type:u,children:[]};5===u&&(d.index=n,n++),r.children.push(d),i.push(r),r=d}}}return 2===r.type&&(r=i.pop()),i.length,t}function h(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(27),i=n(0),o=n(1),a=n(4),s=n(5),l=n(12),c=n(7),u=n(29),d=Object(u.c)("IStorageKeysSyncRegistryService"),h=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.call(this))._storageKeys=new Map,e._onDidChangeStorageKeys=e._register(new l.a),e._register(Object(c.h)((function(){return e._storageKeys.clear()}))),e}return Object(o.a)(n,[{key:"registerStorageKey",value:function(e){this._storageKeys.has(e.key)||(this._storageKeys.set(e.key,e),this._onDidChangeStorageKeys.fire(this.storageKeys))}},{key:"storageKeys",get:function(){return Object(r.a)(this._storageKeys.values())}}]),n}(c.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(38);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t0&&o._textAreaState.value.substr(o._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"!==a.code&&"ArrowLeft"!==a.code||(t=!0)),t?o._textAreaState=new v.b(o._textAreaState.value,o._textAreaState.selectionStart-1,o._textAreaState.selectionEnd,o._textAreaState.selectionStartPosition?new _.a(o._textAreaState.selectionStartPosition.lineNumber,o._textAreaState.selectionStartPosition.column-1):null,o._textAreaState.selectionEndPosition):u.f||o._setAndWriteTextAreaState("compositionstart",v.b.EMPTY),o._onCompositionStart.fire({moveOneCharacterLeft:t})}})));var s=function(e){var t=o._textAreaState,n=v.b.readFromTextArea(o._textArea);return[n,v.b.deduceInput(t,n,e)]},c=function(e){var t=o._textAreaState,n=v.b.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},p=function(e){return!(!u.f||"ja"!==e)};return o._register(d.addDisposableListener(i.domNode,"compositionupdate",(function(e){if(p(e.locale)){var t=s(!1),n=Object(r.a)(t,2),i=n[0],a=n[1];return o._textAreaState=i,o._onType.fire(a),void o._onCompositionUpdate.fire(e)}var l=c(e.data||""),u=Object(r.a)(l,2),d=u[0],h=u[1];o._textAreaState=d,o._onType.fire(h),o._onCompositionUpdate.fire(e)}))),o._register(d.addDisposableListener(i.domNode,"compositionend",(function(e){if(o._isDoingComposition){if(p(e.locale)){var t=s(!1),n=Object(r.a)(t,2),i=n[0],a=n[1];o._textAreaState=i,o._onType.fire(a)}else{var l=c(e.data||""),d=Object(r.a)(l,2),h=d[0],f=d[1];o._textAreaState=h,o._onType.fire(f)}(u.f||u.e)&&(o._textAreaState=v.b.readFromTextArea(o._textArea)),o._isDoingComposition&&(o._isDoingComposition=!1,o._onCompositionEnd.fire())}}))),o._register(d.addDisposableListener(i.domNode,"input",(function(){if(o._textArea.setIgnoreSelectionChangeTime("received input event"),!o._isDoingComposition){var e=s(g.f),t=Object(r.a)(e,2),n=t[0],i=t[1];0===i.replaceCharCnt&&1===i.text.length&&m.F(i.text.charCodeAt(0))||(o._textAreaState=n,0===o._nextCommand?""!==i.text&&o._onType.fire(i):(""===i.text&&0===i.replaceCharCnt||o._firePaste(i.text,null),o._nextCommand=0))}}))),o._register(d.addDisposableListener(i.domNode,"cut",(function(e){o._textArea.setIgnoreSelectionChangeTime("received cut event"),o._ensureClipboardGetsEditorSelection(e),o._asyncTriggerCut.schedule()}))),o._register(d.addDisposableListener(i.domNode,"copy",(function(e){o._ensureClipboardGetsEditorSelection(e)}))),o._register(d.addDisposableListener(i.domNode,"paste",(function(e){if(o._textArea.setIgnoreSelectionChangeTime("received paste event"),E.canUseTextData(e)){var t=E.getTextData(e),n=Object(r.a)(t,2),i=n[0],a=n[1];""!==i&&o._firePaste(i,a)}else o._textArea.getSelectionStart()!==o._textArea.getSelectionEnd()&&o._setAndWriteTextAreaState("paste",v.b.EMPTY),o._nextCommand=1}))),o._register(d.addDisposableListener(i.domNode,"focus",(function(){o._setHasFocus(!0)}))),o._register(d.addDisposableListener(i.domNode,"blur",(function(){o._setHasFocus(!1)}))),o}return Object(c.a)(n,[{key:"_installSelectionChangeListener",value:function(){var e=this,t=0;return d.addDisposableListener(document,"selectionchange",(function(n){if(e._hasFocus&&!e._isDoingComposition&&u.e){var r=Date.now(),i=r-t;if(t=r,!(i<5)){var o=r-e._textArea.getIgnoreSelectionChangeTime();if(e._textArea.resetSelectionChangeTime(),!(o<100)&&e._textAreaState.selectionStartPosition&&e._textAreaState.selectionEndPosition){var a=e._textArea.getValue();if(e._textAreaState.value===a){var s=e._textArea.getSelectionStart(),l=e._textArea.getSelectionEnd();if(e._textAreaState.selectionStart!==s||e._textAreaState.selectionEnd!==l){var c=e._textAreaState.deduceEditorPosition(s),d=e._host.deduceModelPosition(c[0],c[1],c[2]),h=e._textAreaState.deduceEditorPosition(l),f=e._host.deduceModelPosition(h[0],h[1],h[2]),p=new b.a(d.lineNumber,d.column,f.lineNumber,f.column);e._onSelectionChangeRequest.fire(p)}}}}}}))}},{key:"dispose",value:function(){Object(i.a)(Object(o.a)(n.prototype),"dispose",this).call(this),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}},{key:"focusTextArea",value:function(){this._setHasFocus(!0),this.refreshFocusState()}},{key:"isFocused",value:function(){return this._hasFocus}},{key:"refreshFocusState",value:function(){var e=d.getShadowRoot(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):d.isInDOM(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}},{key:"_setHasFocus",value:function(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&(u.f?this._setAndWriteTextAreaState("focusgain",v.b.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}},{key:"_setAndWriteTextAreaState",value:function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}},{key:"writeScreenReaderContent",value:function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}},{key:"_ensureClipboardGetsEditorSelection",value:function(e){var t=this._host.getDataToCopy(E.canUseTextData(e)&&y.a.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};C.INSTANCE.set(u.h?t.text.replace(/\r\n/g,"\n"):t.text,n),E.canUseTextData(e)?E.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",v.b.selectedText(t.text))}},{key:"_firePaste",value:function(e,t){t||(t=C.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}]),n}(p.a),E=function(){function e(){Object(l.a)(this,e)}return Object(c.a)(e,null,[{key:"canUseTextData",value:function(e){return!!e.clipboardData||!!window.clipboardData}},{key:"getTextData",value:function(e){if(e.clipboardData){e.preventDefault();var t=e.clipboardData.getData("text/plain"),n=null,r=e.clipboardData.getData("vscode-editor-data");if("string"===typeof r)try{1!==(n=JSON.parse(r)).version&&(n=null)}catch(i){}return[t,n]}if(window.clipboardData)return e.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}},{key:"setTextData",value:function(e,t,n,r){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"===typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(r)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}]),e}(),w=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._actual=e,r._ignoreSelectionChangeTime=0,r}return Object(c.a)(n,[{key:"setIgnoreSelectionChangeTime",value:function(e){this._ignoreSelectionChangeTime=Date.now()}},{key:"getIgnoreSelectionChangeTime",value:function(){return this._ignoreSelectionChangeTime}},{key:"resetSelectionChangeTime",value:function(){this._ignoreSelectionChangeTime=0}},{key:"getValue",value:function(){return this._actual.domNode.value}},{key:"setValue",value:function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}},{key:"getSelectionStart",value:function(){return this._actual.domNode.selectionStart}},{key:"getSelectionEnd",value:function(){return this._actual.domNode.selectionEnd}},{key:"setSelectionRange",value:function(e,t,n){var r=this._actual.domNode,i=d.getShadowRoot(r),o=(i?i.activeElement:document.activeElement)===r,a=r.selectionStart,s=r.selectionEnd;if(o&&a===t&&s===n)u.h&&window.parent!==window&&r.focus();else{if(o)return this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(t,n),void(u.h&&window.parent!==window&&r.focus());try{var l=d.saveParentsScrollTop(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(t,n),d.restoreParentsScrollTop(r,l)}catch(c){}}}}]),n}(p.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(1),o=function(){function e(t,n,i){Object(r.a)(this,e),this.from=0|t,this.to=0|n,this.colorId=0|i}return Object(i.a)(e,null,[{key:"compare",value:function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}]),e}(),a=function(){function e(t,n,i){Object(r.a)(this,e),this.startLineNumber=t,this.endLineNumber=n,this.color=i,this._colorZone=null}return Object(i.a)(e,[{key:"setColorZone",value:function(e){this._colorZone=e}},{key:"getColorZones",value:function(){return this._colorZone}}],[{key:"compare",value:function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(f=n-p);var g=c.color,m=this._color2Id[g];m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var v=new o(f-p,f+p,m);c.setColorZone(v),a.push(v)}return this._colorZonesInvalid=!1,a.sort(o.compare),a}}]),e}()},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d1)for(var n=1;nh})).length)return null;gh&&l.delete(h,p),u=(d=h)+i[c].length}return l.addMark(d,u,t.create(s)),l.removeStoredMark(t),l}))}},function(e,t,n){e.exports=function(e,t){var n=e[e.length-1];return n&&n[1].type===t?r(n[2].sliceStream(n[1])):0};var r=n(398)},function(e,t,n){"use strict";var r,i,o,a,s=n(192),l=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var c=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS=(s(a={},l.HTML,(s(r={},c.ADDRESS,!0),s(r,c.APPLET,!0),s(r,c.AREA,!0),s(r,c.ARTICLE,!0),s(r,c.ASIDE,!0),s(r,c.BASE,!0),s(r,c.BASEFONT,!0),s(r,c.BGSOUND,!0),s(r,c.BLOCKQUOTE,!0),s(r,c.BODY,!0),s(r,c.BR,!0),s(r,c.BUTTON,!0),s(r,c.CAPTION,!0),s(r,c.CENTER,!0),s(r,c.COL,!0),s(r,c.COLGROUP,!0),s(r,c.DD,!0),s(r,c.DETAILS,!0),s(r,c.DIR,!0),s(r,c.DIV,!0),s(r,c.DL,!0),s(r,c.DT,!0),s(r,c.EMBED,!0),s(r,c.FIELDSET,!0),s(r,c.FIGCAPTION,!0),s(r,c.FIGURE,!0),s(r,c.FOOTER,!0),s(r,c.FORM,!0),s(r,c.FRAME,!0),s(r,c.FRAMESET,!0),s(r,c.H1,!0),s(r,c.H2,!0),s(r,c.H3,!0),s(r,c.H4,!0),s(r,c.H5,!0),s(r,c.H6,!0),s(r,c.HEAD,!0),s(r,c.HEADER,!0),s(r,c.HGROUP,!0),s(r,c.HR,!0),s(r,c.HTML,!0),s(r,c.IFRAME,!0),s(r,c.IMG,!0),s(r,c.INPUT,!0),s(r,c.LI,!0),s(r,c.LINK,!0),s(r,c.LISTING,!0),s(r,c.MAIN,!0),s(r,c.MARQUEE,!0),s(r,c.MENU,!0),s(r,c.META,!0),s(r,c.NAV,!0),s(r,c.NOEMBED,!0),s(r,c.NOFRAMES,!0),s(r,c.NOSCRIPT,!0),s(r,c.OBJECT,!0),s(r,c.OL,!0),s(r,c.P,!0),s(r,c.PARAM,!0),s(r,c.PLAINTEXT,!0),s(r,c.PRE,!0),s(r,c.SCRIPT,!0),s(r,c.SECTION,!0),s(r,c.SELECT,!0),s(r,c.SOURCE,!0),s(r,c.STYLE,!0),s(r,c.SUMMARY,!0),s(r,c.TABLE,!0),s(r,c.TBODY,!0),s(r,c.TD,!0),s(r,c.TEMPLATE,!0),s(r,c.TEXTAREA,!0),s(r,c.TFOOT,!0),s(r,c.TH,!0),s(r,c.THEAD,!0),s(r,c.TITLE,!0),s(r,c.TR,!0),s(r,c.TRACK,!0),s(r,c.UL,!0),s(r,c.WBR,!0),s(r,c.XMP,!0),r)),s(a,l.MATHML,(s(i={},c.MI,!0),s(i,c.MO,!0),s(i,c.MN,!0),s(i,c.MS,!0),s(i,c.MTEXT,!0),s(i,c.ANNOTATION_XML,!0),i)),s(a,l.SVG,(s(o={},c.TITLE,!0),s(o,c.FOREIGN_OBJECT,!0),s(o,c.DESC,!0),o)),a)},function(e,t,n){"use strict";var r=n(113);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.f})),n.d(t,"g",(function(){return r.g}))},function(e,t,n){"use strict";var r=n(113);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";var r=n(113);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";n.r(t),n.d(t,"keydownHandler",(function(){return _})),n.d(t,"keymap",(function(){return v}));for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),l="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),c="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=o&&(l||+o[1]<57)||s&&l,d=0;d<10;d++)r[48+d]=r[96+d]=String(d);for(d=1;d<=24;d++)r[d+111]="F"+d;for(d=65;d<=90;d++)r[d]=String.fromCharCode(d+32),i[d]=String.fromCharCode(d);for(var h in r)i.hasOwnProperty(h)||(i[h]=r[h]);var f=n(37),p="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function g(e){var t,n,r,i,o=e.split(/-(?!$)/),a=o[o.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(o=r[n.keyCode])&&o!=s){var h=t[m(o,n,!0)];if(h&&h(e.state,e.dispatch,e))return!0}else if(l&&n.shiftKey){var f=t[m(s,n,!0)];if(f&&f(e.state,e.dispatch,e))return!0}return!1}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));n(6);var r,i,o=n(0),a=n(1),s=n(39),l=n(61),c=n(29),u=(n(84),Object(c.c)("contextService"));!function(e){e.isIWorkspace=function(e){return!(!e||"object"!==typeof e||"string"!==typeof e.id||!Array.isArray(e.folders))}}(r||(r={})),function(e){e.isIWorkspaceFolder=function(e){return!(!e||"object"!==typeof e||!s.a.isUri(e.uri)||"string"!==typeof e.name||"function"!==typeof e.toResource)}}(i||(i={}));var d=function(){function e(t,n){Object(o.a)(this,e),this.raw=n,this.uri=t.uri,this.index=t.index,this.name=t.name}return Object(a.a)(e,[{key:"toResource",value:function(e){return l.g(this.uri,e)}},{key:"toJSON",value:function(){return{uri:this.uri,name:this.name,index:this.index}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(0),l=n(1),c=n(12),u=n(7),d=function(){function e(t,n,r,i,o,a){Object(s.a)(this,e),t|=0,n|=0,r|=0,i|=0,o|=0,a|=0,this.rawScrollLeft=r,this.rawScrollTop=a,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),a+i>o&&(a=o-i),a<0&&(a=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=o,this.scrollTop=a}return Object(l.a)(e,[{key:"equals",value:function(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}},{key:"withScrollDimensions",value:function(t,n){return new e("undefined"!==typeof t.width?t.width:this.width,"undefined"!==typeof t.scrollWidth?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof t.height?t.height:this.height,"undefined"!==typeof t.scrollHeight?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}},{key:"withScrollPosition",value:function(t){return new e(this.width,this.scrollWidth,"undefined"!==typeof t.scrollLeft?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof t.scrollTop?t.scrollTop:this.rawScrollTop)}},{key:"createScrollEvent",value:function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,i=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,a=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:n,scrollLeftChanged:r,heightChanged:i,scrollHeightChanged:o,scrollTopChanged:a}}}]),e}(),h=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this))._onScroll=i._register(new c.a),i.onScroll=i._onScroll.event,i._smoothScrollDuration=e,i._scheduleAtNextAnimationFrame=r,i._state=new d(0,0,0,0,0,0),i._smoothScrolling=null,i}return Object(l.a)(n,[{key:"dispose",value:function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"setSmoothScrollDuration",value:function(e){this._smoothScrollDuration=e}},{key:"validateScrollPosition",value:function(e){return this._state.withScrollPosition(e)}},{key:"getScrollDimensions",value:function(){return this._state}},{key:"setScrollDimensions",value:function(e,t){var n=this._state.withScrollDimensions(e,t);this._setState(n),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}},{key:"getFutureScrollPosition",value:function(){return this._smoothScrolling?this._smoothScrolling.to:this._state}},{key:"getCurrentScrollPosition",value:function(){return this._state}},{key:"setScrollPositionNow",value:function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)}},{key:"setScrollPositionSmooth",value:function(e){var t=this;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};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var r=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=r}else{var i=this._state.withScrollPosition(e);this._smoothScrolling=g.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))}},{key:"_performSmoothScrolling",value:function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),this._smoothScrolling)return t.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})))}}},{key:"_setState",value:function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))}}]),n}(u.a),f=function e(t,n,r){Object(s.a)(this,e),this.scrollLeft=t,this.scrollTop=n,this.isDone=r};function p(e,t){var n=t-e;return function(t){return e+n*(1-function(e){return Math.pow(e,3)}(1-t))}}var g=function(){function e(t,n,r,i){Object(s.a)(this,e),this.from=t,this.to=n,this.duration=i,this._startTime=r,this.animationFrameDisposable=null,this._initAnimations()}return Object(l.a)(e,[{key:"_initAnimations",value:function(){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)}},{key:"_initAnimation",value:function(e,t,n){var r,i,o,a,s;return Math.abs(e-t)>2.5*n?(e1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n-1;Object(r.a)(this,e),this.items=t,this.start=n,this.end=i,this.index=o}return Object(i.a)(e,[{key:"current",value:function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}},{key:"next",value:function(){return this.index=Math.min(this.index+1,this.end),this.current()}},{key:"previous",value:function(){return this.index=Math.max(this.index-1,this.start-1),this.current()}},{key:"first",value:function(){return this.index=this.start,this.current()}},{key:"last",value:function(){return this.index=this.end-1,this.current()}}]),e}(),S=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;Object(r.a)(this,e),this._initialize(t),this._limit=n,this._onChange()}return Object(i.a)(e,[{key:"add",value:function(e){this._history.delete(e),this._history.add(e),this._onChange()}},{key:"next",value:function(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}},{key:"previous",value:function(){return 0!==this._currentPosition()?this._navigator.previous():null}},{key:"current",value:function(){return this._navigator.current()}},{key:"first",value:function(){return this._navigator.first()}},{key:"last",value:function(){return this._navigator.last()}},{key:"has",value:function(e){return this._history.has(e)}},{key:"_onChange",value:function(){this._reduceToLimit();var e=this._elements;this._navigator=new y(e,0,e.length,e.length)}},{key:"_reduceToLimit",value:function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}},{key:"_currentPosition",value:function(){var e=this._navigator.current();return e?this._elements.indexOf(e):-1}},{key:"_initialize",value:function(e){this._history=new Set;var t,n=Object(b.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._history.add(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_elements",get:function(){var e=[];return this._history.forEach((function(t){return e.push(t)})),e}}]),e}(),C=n(109),k=n(52),E=d.$,w={inputBackground:v.a.fromHex("#3C3C3C"),inputForeground:v.a.fromHex("#CCCCCC"),inputValidationInfoBorder:v.a.fromHex("#55AAFF"),inputValidationInfoBackground:v.a.fromHex("#063B49"),inputValidationWarningBorder:v.a.fromHex("#B89500"),inputValidationWarningBackground:v.a.fromHex("#352A05"),inputValidationErrorBorder:v.a.fromHex("#BE1100"),inputValidationErrorBackground:v.a.fromHex("#5A1D1D")},O=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,i,a){var s;Object(r.a)(this,n),(s=t.call(this)).state="idle",s.maxHeight=Number.POSITIVE_INFINITY,s._onDidChange=s._register(new g.a),s.onDidChange=s._onDidChange.event,s._onDidHeightChange=s._register(new g.a),s.onDidHeightChange=s._onDidHeightChange.event,s.contextViewProvider=i,s.options=a||Object.create(null),Object(_.g)(s.options,w,!1),s.message=null,s.placeholder=s.options.placeholder||"",s.ariaLabel=s.options.ariaLabel||"",s.inputBackground=s.options.inputBackground,s.inputForeground=s.options.inputForeground,s.inputBorder=s.options.inputBorder,s.inputValidationInfoBorder=s.options.inputValidationInfoBorder,s.inputValidationInfoBackground=s.options.inputValidationInfoBackground,s.inputValidationInfoForeground=s.options.inputValidationInfoForeground,s.inputValidationWarningBorder=s.options.inputValidationWarningBorder,s.inputValidationWarningBackground=s.options.inputValidationWarningBackground,s.inputValidationWarningForeground=s.options.inputValidationWarningForeground,s.inputValidationErrorBorder=s.options.inputValidationErrorBorder,s.inputValidationErrorBackground=s.options.inputValidationErrorBackground,s.inputValidationErrorForeground=s.options.inputValidationErrorForeground,s.options.validationOptions&&(s.validation=s.options.validationOptions.validation),s.element=d.append(e,E(".monaco-inputbox.idle"));var l=s.options.flexibleHeight?"textarea":"input",c=d.append(s.element,E(".wrapper"));if(s.input=d.append(c,E(l+".input.empty")),s.input.setAttribute("autocorrect","off"),s.input.setAttribute("autocapitalize","off"),s.input.setAttribute("spellcheck","false"),s.onfocus(s.input,(function(){return s.element.classList.add("synthetic-focus")})),s.onblur(s.input,(function(){return s.element.classList.remove("synthetic-focus")})),s.options.flexibleHeight){s.maxHeight="number"===typeof s.options.flexibleMaxHeight?s.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,s.mirror=d.append(c,E("div.mirror")),s.mirror.innerText="\xa0",s.scrollableElement=new C.b(s.element,{vertical:1}),s.options.flexibleWidth&&(s.input.setAttribute("wrap","off"),s.mirror.style.whiteSpace="pre",s.mirror.style.wordWrap="initial"),d.append(e,s.scrollableElement.getDomNode()),s._register(s.scrollableElement),s._register(s.scrollableElement.onScroll((function(e){return s.input.scrollTop=e.scrollTop})));var u=g.b.filter(Object(k.a)(document,"selectionchange"),(function(){var e=document.getSelection();return(null===e||void 0===e?void 0:e.anchorNode)===c}));s._register(u(s.updateScrollDimensions,Object(o.a)(s))),s._register(s.onDidHeightChange(s.updateScrollDimensions,Object(o.a)(s)))}else s.input.type=s.options.type||"text",s.input.setAttribute("wrap","off");return s.ariaLabel&&s.input.setAttribute("aria-label",s.ariaLabel),s.placeholder&&s.setPlaceHolder(s.placeholder),s.oninput(s.input,(function(){return s.onValueChange()})),s.onblur(s.input,(function(){return s.onBlur()})),s.onfocus(s.input,(function(){return s.onFocus()})),s.ignoreGesture(s.input),setTimeout((function(){return s.updateMirror()}),0),s.options.actions&&(s.actionbar=s._register(new p.a(s.element)),s.actionbar.push(s.options.actions,{icon:!0,label:!1})),s.applyStyles(),s}return Object(i.a)(n,[{key:"onBlur",value:function(){this._hideMessage()}},{key:"onFocus",value:function(){this._showMessage()}},{key:"setPlaceHolder",value:function(e){this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}},{key:"setAriaLabel",value:function(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}},{key:"getAriaLabel",value:function(){return this.ariaLabel}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"hasFocus",value:function(){return document.activeElement===this.input}},{key:"select",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)}},{key:"isSelectionAtEnd",value:function(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}},{key:"enable",value:function(){this.input.removeAttribute("disabled")}},{key:"disable",value:function(){this.blur(),this.input.disabled=!0,this._hideMessage()}},{key:"updateScrollDimensions",value:function(){if("number"===typeof this.cachedContentHeight&&"number"===typeof this.cachedHeight&&this.scrollableElement){var e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}}},{key:"showMessage",value:function(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));var n=this.stylesForType(this.message.type);this.element.style.border=n.border?"1px solid ".concat(n.border):"",(this.hasFocus()||t)&&this._showMessage()}},{key:"hideMessage",value:function(){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()}},{key:"validate",value:function(){var e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e}},{key:"stylesForType",value:function(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}}}},{key:"classForType",value:function(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}},{key:"_showMessage",value:function(){var e=this;if(this.contextViewProvider&&this.message){var t,n,r=function(){return t.style.width=d.getTotalWidth(e.element)+"px"};this.contextViewProvider.showContextView({getAnchor:function(){return e.element},anchorAlignment:1,render:function(n){if(!e.message)return null;t=d.append(n,E(".monaco-inputbox-container")),r();var i={inline:!0,className:"monaco-inputbox-message"},o=e.message.formatContent?Object(h.b)(e.message.content,i):Object(h.c)(e.message.content,i);o.classList.add(e.classForType(e.message.type));var a=e.stylesForType(e.message.type);return o.style.backgroundColor=a.background?a.background.toString():"",o.style.color=a.foreground?a.foreground.toString():"",o.style.border=a.border?"1px solid ".concat(a.border):"",d.append(t,o),null},onHide:function(){e.state="closed"},layout:r}),n=3===this.message.type?u.a("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?u.a("alertWarningMessage","Warning: {0}",this.message.content):u.a("alertInfoMessage","Info: {0}",this.message.content),f.a(n),this.state="open"}}},{key:"_hideMessage",value:function(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}},{key:"onValueChange",value:function(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}},{key:"updateMirror",value:function(){if(this.mirror){var e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText="\xa0",this.layout()}}},{key:"style",value:function(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()}},{key:"applyStyles",value:function(){var e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=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=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}},{key:"layout",value:function(){if(this.mirror){var e=this.cachedContentHeight;this.cachedContentHeight=d.getTotalHeight(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))}}},{key:"insertAtCursor",value:function(e){var t=this.inputElement,n=t.selectionStart,r=t.selectionEnd,i=t.value;null!==n&&null!==r&&(this.value=i.substr(0,n)+e+i.substr(r),t.setSelectionRange(n+1,n+1),this.layout())}},{key:"dispose",value:function(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"inputElement",get:function(){return this.input}},{key:"value",get:function(){return this.input.value},set:function(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}},{key:"height",get:function(){return"number"===typeof this.cachedHeight?this.cachedHeight:d.getTotalHeight(this.element)}},{key:"width",get:function(){return d.getTotalWidth(this.input)},set:function(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){var t=0;if(this.mirror)t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0);this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}},{key:"paddingRight",set:function(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width="calc(100% - ".concat(e,"px)"):this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}}]),n}(m.a),T=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,i,o){var a;return Object(r.a)(this,n),(a=t.call(this,e,i,o)).history=new S(o.history,100),a}return Object(i.a)(n,[{key:"addToHistory",value:function(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}},{key:"showNextValue",value:function(){this.history.has(this.value)||this.addToHistory();var e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,f.c(this.value))}},{key:"showPreviousValue",value:function(){this.history.has(this.value)||this.addToHistory();var e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,f.c(this.value))}},{key:"getCurrentValue",value:function(){var e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}},{key:"getPreviousValue",value:function(){return this.history.previous()||this.history.first()}},{key:"getNextValue",value:function(){return this.history.next()||this.history.last()}}]),n}(O)},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t?"Assertion failed (".concat(t,")"):"Assertion Failed")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return _}));var r=n(6),i=n(0),o=n(1),a=n(2),s=n(25),l=n(34),c=n(39),u=n(233),d=n(80);function h(e){return e.toString()}var f=function(){function e(t,n,r,o,a,s,l){Object(i.a)(this,e),this.beforeVersionId=t,this.afterVersionId=n,this.beforeEOL=r,this.afterEOL=o,this.beforeCursorState=a,this.afterCursorState=s,this.changes=l}return Object(o.a)(e,[{key:"append",value:function(e,t,n,r,i){t.length>0&&(this.changes=Object(u.b)(this.changes,t)),this.afterEOL=n,this.afterVersionId=r,this.afterCursorState=i}},{key:"serialize",value:function(){var t,n=10+e._writeSelectionsSize(this.beforeCursorState)+e._writeSelectionsSize(this.afterCursorState)+4,i=Object(r.a)(this.changes);try{for(i.s();!(t=i.n()).done;){n+=t.value.writeSize()}}catch(c){i.e(c)}finally{i.f()}var o=new Uint8Array(n),a=0;d.f(o,this.beforeVersionId,a),a+=4,d.f(o,this.afterVersionId,a),a+=4,d.g(o,this.beforeEOL,a),a+=1,d.g(o,this.afterEOL,a),a+=1,a=e._writeSelections(o,this.beforeCursorState,a),a=e._writeSelections(o,this.afterCursorState,a),d.f(o,this.changes.length,a),a+=4;var s,l=Object(r.a)(this.changes);try{for(l.s();!(s=l.n()).done;){a=s.value.write(o,a)}}catch(c){l.e(c)}finally{l.f()}return o.buffer}}],[{key:"create",value:function(t,n){var r=t.getAlternativeVersionId(),i=m(t);return new e(r,r,i,i,n,n,[])}},{key:"_writeSelectionsSize",value:function(e){return 4+16*(e?e.length:0)}},{key:"_writeSelections",value:function(e,t,n){if(d.f(e,t?t.length:0,n),n+=4,t){var i,o=Object(r.a)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;d.f(e,a.selectionStartLineNumber,n),n+=4,d.f(e,a.selectionStartColumn,n),n+=4,d.f(e,a.positionLineNumber,n),n+=4,d.f(e,a.positionColumn,n),n+=4}}catch(s){o.e(s)}finally{o.f()}}return n}},{key:"_readSelections",value:function(e,t,n){var r=d.c(e,t);t+=4;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=r.findSelectedNodeOfType(e)(n.selection)||r.findParentNode((function(t){return t.type===e}))(n.selection);return Object.keys(t).length&&i?i.node.hasMarkup(e,Object.assign(Object.assign({},i.node.attrs),t)):!!i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Error="error",e.Info="info"}(t.ToastType||(t.ToastType={}))},function(e,t,n){"use strict";var r={};function i(e,t,n){var o,a,s,l,c,u="";for("string"!==typeof t&&(n=t,t=i.defaultChars),"undefined"===typeof n&&(n=!0),c=function(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},function(e,t,n){"use strict";function r(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t){e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},function(e,t,n){t.tokenize=function(e,t,n){return i(e,(function(e){return null===e||r(e)?t(e):n(e)}),"linePrefix")},t.partial=!0;var r=n(98),i=n(101)},function(e,t){e.exports=function(e,t,n){var r,i=[],o=-1;for(;++o=n)return i.substr(0,n);for(;n>i.length&&t>1;)1&t&&(i+=e),t>>=1,e+=e;return i=(i+=e).substr(0,n)}},function(e,t,n){"use strict";var r=n(113);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return i.a.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof r.a||e instanceof Uint8Array)return e;if(Array.isArray(e))for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:i.h;if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){var a=Object(r.T)(e,t);if(!a)return!1;if(t.length===e.length)return!0;var s=t.length;return t.charAt(t.length-1)===o&&s--,e.charAt(s)===o}return t.charAt(t.length-1)!==o&&(t+=o),0===e.indexOf(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(22),i=n(0),o=n(1),a=n(80),s=n(144),l=function(){function e(t,n,r,o){Object(i.a)(this,e),this.oldPosition=t,this.oldText=n,this.newPosition=r,this.newText=o}return Object(o.a)(e,[{key:"toString",value:function(){return 0===this.oldText.length?"(insert@".concat(this.oldPosition,' "').concat(this.newText,'")'):0===this.newText.length?"(delete@".concat(this.oldPosition,' "').concat(this.oldText,'")'):"(replace@".concat(this.oldPosition,' "').concat(this.oldText,'" with "').concat(this.newText,'")')}},{key:"writeSize",value:function(){return 8+e._writeStringSize(this.oldText)+e._writeStringSize(this.newText)}},{key:"write",value:function(t,n){return a.f(t,this.oldPosition,n),n+=4,a.f(t,this.newPosition,n),n+=4,n=e._writeString(t,this.oldText,n),n=e._writeString(t,this.newText,n)}},{key:"oldLength",get:function(){return this.oldText.length}},{key:"oldEnd",get:function(){return this.oldPosition+this.oldText.length}},{key:"newLength",get:function(){return this.newText.length}},{key:"newEnd",get:function(){return this.newPosition+this.newText.length}}],[{key:"_writeStringSize",value:function(e){return 4+2*e.length}},{key:"_writeString",value:function(e,t,n){var r=t.length;a.f(e,r,n),n+=4;for(var i=0;i1){var m=n.getLineContent(g.lineNumber),v=a.w(m),_=-1===v?m.length+1:v+1;if(g.column<=_){var b=l.a.visibleColumnFromColumn2(t,n,g),y=l.a.prevIndentTabStop(b,t.indentSize),S=l.a.columnFromVisibleColumn2(t,n,g.lineNumber,y);p=new u.a(g.lineNumber,S,g.lineNumber,g.column)}else p=new u.a(g.lineNumber,g.column-1,g.lineNumber,g.column)}else{var C=c.a.left(t,n,g.lineNumber,g.column);p=new u.a(C.lineNumber,C.column,g.lineNumber,g.column)}}p.isEmpty()?i[d]=null:(p.startLineNumber!==p.endLineNumber&&(o=!0),i[d]=new s.a(p,""))}return[o,i]}},{key:"cut",value:function(e,t,n){for(var r=[],i=0,o=n.length;i1?(d=c.lineNumber-1,h=t.getLineMaxColumn(c.lineNumber-1),f=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,h=1,f=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber));var g=new u.a(d,h,f,p);g.isEmpty()?r[i]=null:r[i]=new s.a(g,"")}else r[i]=null;else r[i]=new s.a(a,"")}return new l.e(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(15),i=n(117),o=n(94),a={getInitialState:function(){return o.c},tokenize2:function(e,t,n){return Object(o.e)(0,e,t,n)}};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return c(e,t||a)}function l(e,t,n,r,i,o,a){for(var s="
",l=r,c=0,u=0,d=t.getCount();u0;)f+=a?" ":" ",g--;break;case 60:f+="<";break;case 62:f+=">";break;case 38:f+="&";break;case 0:f+="�";break;case 65279:case 8232:case 8233:case 133:f+="\ufffd";break;case 13:f+="​";break;case 32:f+=a?" ":" ";break;default:f+=String.fromCharCode(p)}}if(s+='').concat(f,""),h>i||l>=i)break}}return s+="
"}function c(e,t){for(var n='
',o=e.split(/\r\n|\r|\n/),a=t.getInitialState(),s=0,l=o.length;s0&&(n+="
");var u=t.tokenize2(c,a,0);i.a.convertToEndOffset(u.tokens,c.length);for(var d=new i.a(u.tokens,c).inflate(),h=0,f=0,p=d.getCount();f').concat(r.u(c.substring(h,m)),""),h=m}a=u.endState}return n+="
"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return P}));var r=n(17),i=n(16),o=n(6),a=n(36),s=n(4),l=n(5),c=n(0),u=n(1),d=n(12),h=n(7),f=n(21),p=n(25),g=n(43),m=n(45),v=n(20),_=n(160),b=n(174),y=n(62),S=n(32),C=n(41),k=n(30),E=n(106),w=n(167),O=n(185),T=n(216),x=n(237),N=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},D=function(e,t){return function(n,r){t(n,r,e)}};function L(e){return e.toString()}var A=function(){function e(t,n,r){Object(c.a)(this,e),this._modelEventListeners=new h.b,this.model=t,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(t.onWillDispose((function(){return n(t)}))),this._modelEventListeners.add(t.onDidChangeLanguage((function(e){return r(t,e)})))}return Object(u.a)(e,[{key:"_disposeLanguageSelection",value:function(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}},{key:"dispose",value:function(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}},{key:"setLanguage",value:function(e){var t=this;this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((function(){return t.model.setMode(e.languageIdentifier)})),this.model.setMode(e.languageIdentifier)}}]),e}(),I=f.d||f.f?1:2,R=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,i,o,s){var l;return Object(c.a)(this,n),(l=t.call(this))._configurationService=e,l._resourcePropertiesService=r,l._themeService=i,l._logService=o,l._undoRedoService=s,l._onModelAdded=l._register(new d.a),l.onModelAdded=l._onModelAdded.event,l._onModelRemoved=l._register(new d.a),l.onModelRemoved=l._onModelRemoved.event,l._onModelModeChanged=l._register(new d.a),l.onModelModeChanged=l._onModelModeChanged.event,l._modelCreationOptionsByLanguageAndResource=Object.create(null),l._models={},l._disposedModels=new Map,l._disposedModelsHeapSize=0,l._semanticStyling=l._register(new F(l._themeService,l._logService)),l._register(l._configurationService.onDidChangeConfiguration((function(){return l._updateModelOptions()}))),l._updateModelOptions(),l._register(new j(Object(a.a)(l),l._themeService,l._configurationService,l._semanticStyling)),l}return Object(u.a)(n,[{key:"_getEOL",value:function(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);var n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"auto"!==n?n:3===f.a||2===f.a?"\n":"\r\n"}},{key:"getCreationOptions",value:function(e,t,r){var i=this._modelCreationOptionsByLanguageAndResource[e+t];if(!i){var o=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),a=this._getEOL(t,e);i=n._readModelOptions({editor:o,eol:a},r),this._modelCreationOptionsByLanguageAndResource[e+t]=i}return i}},{key:"_updateModelOptions",value:function(){var e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);for(var t=Object.keys(this._models),r=0,i=t.length;r3&&void 0!==arguments[3]&&arguments[3];return t?(r=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(r.model,t)):r=this._createModelData(e,_.b,n,i),this._onModelAdded.fire(r.model),r.model}},{key:"setMode",value:function(e,t){if(t){var n=this._models[L(e.uri)];n&&n.setLanguage(t)}}},{key:"getModels",value:function(){for(var e=[],t=Object.keys(this._models),n=0,r=t.length;n0&&(e._fetchDocumentSemanticTokens.isScheduled()||e._fetchDocumentSemanticTokens.schedule())}))}}}},{key:"_setDocumentSemanticTokens",value:function(e,t,r,i){var a=this._currentDocumentResponse;if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&r)if(t){if(n._isSemanticTokensEdits(t)){if(!a)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:a.data};else{var s,l=0,c=Object(o.a)(t.edits);try{for(c.s();!(s=c.n()).done;){var u=s.value;l+=(u.data?u.data.length:0)-u.deleteCount}}catch(N){c.e(N)}finally{c.f()}for(var d=a.data,h=new Uint32Array(d.length+l),f=d.length,p=h.length,g=t.edits.length-1;g>=0;g--){var m=t.edits[g],v=f-(m.start+m.deleteCount);v>0&&(n._copy(d,f-v,h,p-v,v),p-=v),m.data&&(n._copy(m.data,0,h,p-m.data.length,m.data.length),p-=m.data.length),f=m.start}f>0&&n._copy(d,0,h,0,f),t={resultId:t.resultId,data:h}}}if(n._isSemanticTokens(t)){this._currentDocumentResponse=new B(e,t.resultId,t.data);var _=Object(x.b)(t,r,this._model.getLanguageIdentifier());if(i.length>0){var b,y=Object(o.a)(i);try{for(y.s();!(b=y.n()).done;){var S,C=b.value,k=Object(o.a)(_);try{for(k.s();!(S=k.n()).done;){var E,w=S.value,O=Object(o.a)(C.changes);try{for(O.s();!(E=O.n()).done;){var T=E.value;w.applyEdit(T.range,T.text)}}catch(N){O.e(N)}finally{O.f()}}}catch(N){k.e(N)}finally{k.f()}}}catch(N){y.e(N)}finally{y.f()}this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}this._model.setSemanticTokens(_,!0)}else this._model.setSemanticTokens(null,!0)}else this._model.setSemanticTokens(null,!0);else this._model.setSemanticTokens(null,!1)}},{key:"_getSemanticColoringProvider",value:function(){var e=v.l.ordered(this._model);return e.length>0?e[0]:null}}],[{key:"_isSemanticTokens",value:function(e){return e&&!!e.data}},{key:"_isSemanticTokensEdits",value:function(e){return e&&Array.isArray(e.edits)}},{key:"_copy",value:function(e,t,n,r,i){for(var o=0;o0&&u>=1;c>0&&this._logService.getLevel()===s.c.Trace&&(this._logService.trace("SemanticTokensProviderStyling: unknown token modifier index: ".concat(t.toString(2)," for legend: ").concat(JSON.stringify(this._legend.tokenModifiers))),l.push("not-in-legend"));var d=this._themeService.getColorTheme().getTokenStyleMetadata(o,l,n.language);if("undefined"===typeof d)r=2147483647;else{if(r=0,"undefined"!==typeof d.italic)r|=1|(d.italic?1:0)<<11;if("undefined"!==typeof d.bold)r|=2|(d.bold?2:0)<<11;if("undefined"!==typeof d.underline)r|=4|(d.underline?4:0)<<11;if(d.foreground)r|=8|d.foreground<<14;0===r&&(r=2147483647)}}else this._logService.getLevel()===s.c.Trace&&this._logService.trace("SemanticTokensProviderStyling: unknown token type index: ".concat(e," for legend: ").concat(JSON.stringify(this._legend.tokenTypes))),r=2147483647,o="not-in-legend";this._hashTable.add(e,t,n.id,r),this._logService.getLevel()===s.c.Trace&&this._logService.trace("SemanticTokensProviderStyling ".concat(e," (").concat(o,") / ").concat(t," (").concat(l.join(" "),"): foreground ").concat(a.B.getForeground(r),", fontStyle ").concat(a.B.getFontStyle(r).toString(2)))}return r}}]),e}();function u(e,t,n){for(var r=e.data,i=e.data.length/5|0,o=Math.max(Math.ceil(i/1024),400),a=[],s=0,c=1,u=0;sd&&0===r[5*f];)f--;if(f-1===d){for(var p=h;p+1=this._growCount){var a=this._elements;this._currentLengthIndex++,this._currentLength=e._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10)for(var n=0,r=e;n0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(Y.a)(this,e),this._value=r,"string"!==typeof this._value)throw Object(ie.b)("value");"boolean"===typeof i?(this._isTrusted=i,this._supportThemeIcons=!1):(this._isTrusted=null!==(t=i.isTrusted)&&void 0!==t&&t,this._supportThemeIcons=null!==(n=i.supportThemeIcons)&&void 0!==n&&n)}return Object($.a)(e,[{key:"appendText",value:function(e){return this._value+=(this._supportThemeIcons?Object(re.b)(e):e).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&").replace(/\n/g,"\n\n"),this}},{key:"appendMarkdown",value:function(e){return this._value+=e,this}},{key:"appendCodeblock",value:function(e,t){return this._value+="\n```",this._value+=e,this._value+="\n",this._value+=t,this._value+="\n```\n",this}},{key:"value",get:function(){return this._value}},{key:"isTrusted",get:function(){return this._isTrusted}},{key:"supportThemeIcons",get:function(){return this._supportThemeIcons}}]),e}();function ae(e){return se(e)?!e.value:!Array.isArray(e)||e.every(ae)}function se(e){return e instanceof oe||!(!e||"object"!==typeof e)&&("string"===typeof e.value&&("boolean"===typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"===typeof e.supportThemeIcons||void 0===e.supportThemeIcons))}function le(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?Object(ne.g)(e,t,ce):!(!se(e)||!se(t))&&ce(e,t))}function ce(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons)}function ue(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function de(e){var t=[],n=e.split("|").map((function(e){return e.trim()}));e=n[0];var r=n[1];if(r){var i=/height=(\d+)/.exec(r),o=/width=(\d+)/.exec(r),a=i?i[1]:"",s=o?o[1]:"",l=isFinite(parseInt(s)),c=isFinite(parseInt(a));l&&t.push('width="'.concat(s,'"')),c&&t.push('height="'.concat(a,'"'))}return{href:e,dimensions:t}}var he=n(74),fe=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},pe=function(e,t){return function(n,r){t(n,r,e)}},ge=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},me=new te.c("selectionAnchorSet",!1),ve=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this.editor=t,this.selectionAnchorSetContextKey=me.bindTo(n),this.modelChangeListener=t.onDidChangeModel((function(){return r.selectionAnchorSetContextKey.reset()}))}return Object($.a)(e,[{key:"setSelectionAnchor",value:function(){if(this.editor.hasModel()){var e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:J.a.fromPositions(e,e),options:{stickiness:1,hoverMessage:(new oe).appendText(Object(Z.a)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Object(he.a)(Object(Z.a)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}},{key:"goToSelectionAnchor",value:function(){if(this.editor.hasModel()&&this.decorationId){var e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}},{key:"selectFromAnchorToCursor",value:function(){if(this.editor.hasModel()&&this.decorationId){var e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){var t=this.editor.getPosition();this.editor.setSelection(J.a.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}},{key:"cancelSelectionAnchor",value:function(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}},{key:"dispose",value:function(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();ve.ID="editor.contrib.selectionAnchorController",ve=fe([pe(1,te.b)],ve);var _e=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.setSelectionAnchor",label:Object(Z.a)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2080),weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ve.get(t).setSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}(Q.b),be=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.goToSelectionAnchor",label:Object(Z.a)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:me})}return Object($.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ve.get(t).goToSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}(Q.b),ye=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.selectFromAnchorToCursor",label:Object(Z.a)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:me,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2089),weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ve.get(t).selectFromAnchorToCursor();case 2:case"end":return e.stop()}}),e)})))}}]),n}(Q.b),Se=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.cancelSelectionAnchor",label:Object(Z.a)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:me,kbOpts:{kbExpr:X.a.editorTextFocus,primary:9,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ve.get(t).cancelSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}(Q.b);Object(Q.m)(ve.ID,ve),Object(Q.k)(_e),Object(Q.k)(be),Object(Q.k)(ye),Object(Q.k)(Se);var Ce=n(6),ke=n(22),Ee=(n(486),n(32)),we=n(7),Oe=n(19),Te=n(8),xe=n(67),Ne=n(45),De=n(66),Le=n(11),Ae=n(30),Ie=n(40),Re=Object(Le.gc)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},Z.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),Me=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.jumpToBracket",label:Z.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3160,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=Fe.get(t);n&&n.jumpToBracket()}}]),n}(Q.b),Pe=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.selectToBracket",label:Z.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){var r=Fe.get(t);if(r){var i=!0;n&&!1===n.selectBrackets&&(i=!1),r.selectToBracket(i)}}}]),n}(Q.b),je=function e(t,n,r){Object(Y.a)(this,e),this.position=t,this.brackets=n,this.options=r},Fe=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._editor=e,r._lastBracketsData=[],r._lastVersionId=0,r._decorations=[],r._updateBracketsSoon=r._register(new Ee.d((function(){return r._updateBrackets()}),50)),r._matchBrackets=r._editor.getOption(55),r._updateBracketsSoon.schedule(),r._register(e.onDidChangeCursorPosition((function(e){"never"!==r._matchBrackets&&r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModelContent((function(e){r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModel((function(e){r._lastBracketsData=[],r._decorations=[],r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModelLanguageConfiguration((function(e){r._lastBracketsData=[],r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeConfiguration((function(e){e.hasChanged(55)&&(r._matchBrackets=r._editor.getOption(55),r._decorations=r._editor.deltaDecorations(r._decorations,[]),r._lastBracketsData=[],r._lastVersionId=0,r._updateBracketsSoon.schedule())}))),r}return Object($.a)(n,[{key:"jumpToBracket",value:function(){if(this._editor.hasModel()){var e=this._editor.getModel(),t=this._editor.getSelections().map((function(t){var n=t.getStartPosition(),r=e.matchBracket(n),i=null;if(r)r[0].containsPosition(n)?i=r[1].getStartPosition():r[1].containsPosition(n)&&(i=r[0].getStartPosition());else{var o=e.findEnclosingBrackets(n);if(o)i=o[0].getStartPosition();else{var a=e.findNextBracket(n);a&&a.range&&(i=a.range.getStartPosition())}}return i?new J.a(i.lineNumber,i.column,i.lineNumber,i.column):new J.a(n.lineNumber,n.column,n.lineNumber,n.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}}},{key:"selectToBracket",value:function(e){if(this._editor.hasModel()){var t=this._editor.getModel(),n=[];this._editor.getSelections().forEach((function(r){var i=r.getStartPosition(),o=t.matchBracket(i);if(!o&&!(o=t.findEnclosingBrackets(i))){var a=t.findNextBracket(i);a&&a.range&&(o=t.matchBracket(a.range.getStartPosition()))}var s=null,l=null;if(o){o.sort(Te.a.compareRangesUsingStarts);var c=o,u=Object(ke.a)(c,2),d=u[0],h=u[1];s=e?d.getStartPosition():d.getEndPosition(),l=e?h.getEndPosition():h.getStartPosition()}s&&l&&n.push(new J.a(s.lineNumber,s.column,l.lineNumber,l.column))})),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}}},{key:"_updateBrackets",value:function(){if("never"!==this._matchBrackets){this._recomputeBrackets();var e,t=[],n=0,r=Object(Ce.a)(this._lastBracketsData);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.brackets;o&&(t[n++]={range:o[0],options:i.options},t[n++]={range:o[1],options:i.options})}}catch(a){r.e(a)}finally{r.f()}this._decorations=this._editor.deltaDecorations(this._decorations,t)}}},{key:"_recomputeBrackets",value:function(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);var e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);var t=this._editor.getModel(),r=t.getVersionId(),i=[];this._lastVersionId===r&&(i=this._lastBracketsData);for(var o=[],a=0,s=0,l=e.length;s1&&o.sort(Oe.a.compare);for(var u=[],d=0,h=0,f=i.length,p=0,g=o.length;p0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}}]),n}(Q.b);Object(Q.k)(Ge);var qe=n(46),Ke=n(21),Ye=n(198),$e=n(49),Qe=n(129),Ze=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Xe="9_cutcopypaste",Je=Ke.g||document.queryCommandSupported("cut"),et=Ke.g||document.queryCommandSupported("copy"),tt=et&&!qe.f,nt=!qe.h||document.queryCommandSupported("paste");function rt(e){return e.register(),e}var it=Je?rt(new Q.e({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ke.g?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ie.b.MenubarEditMenu,group:"2_ccp",title:Z.a({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Ie.b.EditorContext,group:Xe,title:Z.a("actions.clipboard.cutLabel","Cut"),when:X.a.writable,order:1},{menuId:Ie.b.CommandPalette,group:"",title:Z.a("actions.clipboard.cutLabel","Cut"),order:1}]})):void 0,ot=et?rt(new Q.e({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ke.g?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ie.b.MenubarEditMenu,group:"2_ccp",title:Z.a({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Ie.b.EditorContext,group:Xe,title:Z.a("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Ie.b.CommandPalette,group:"",title:Z.a("actions.clipboard.copyLabel","Copy"),order:1}]})):void 0,at=nt?rt(new Q.e({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ke.g?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ie.b.MenubarEditMenu,group:"2_ccp",title:Z.a({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:3},{menuId:Ie.b.EditorContext,group:Xe,title:Z.a("actions.clipboard.pasteLabel","Paste"),when:X.a.writable,order:3},{menuId:Ie.b.CommandPalette,group:"",title:Z.a("actions.clipboard.pasteLabel","Paste"),order:1}]})):void 0,st=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:Z.a("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){t.hasModel()&&(!t.getOption(26)&&t.getSelection().isEmpty()||(Ye.a.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Ye.a.forceCopyWithSyntaxHighlighting=!1))}}]),n}(Q.b);function lt(e,t){e&&(e.addImplementation(1e4,(function(e,n){var r=e.get($e.a).getFocusedCodeEditor();if(r&&r.hasTextFocus()){var i=r.getOption(26),o=r.getSelection();return o&&o.isEmpty()&&!i||document.execCommand(t),!0}return!1})),e.addImplementation(0,(function(e,n){return document.execCommand(t),!0})))}lt(it,"cut"),lt(ot,"copy"),at&&(at.addImplementation(1e4,(function(e,t){var n=e.get($e.a),r=e.get(Qe.a),i=n.getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&(!(!document.execCommand("paste")&&Ke.h)||(Ze(void 0,void 0,void 0,G.a.mark((function e(){var t,n,o,a,s;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.readText();case 2:""!==(t=e.sent)&&(n=Ye.b.INSTANCE.get(t),o=!1,a=null,s=null,n&&(o=i.getOption(26)&&!!n.isFromEmptySelection,a="undefined"!==typeof n.multicursorText?n.multicursorText:null,s=n.mode),i.trigger("keyboard","paste",{text:t,pasteOnNewLine:o,multicursorText:a,mode:s}));case 4:case"end":return e.stop()}}),e)}))),!0))})),at.addImplementation(0,(function(e,t){return document.execCommand("paste"),!0}))),tt&&Object(Q.k)(st);var ct=n(27),ut=n(36),dt=function(){function e(t){Object(Y.a)(this,e),this.executor=t,this._didRun=!1}return Object($.a)(e,[{key:"getValue",value:function(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}},{key:"rawValue",get:function(){return this._value}}]),e}(),ht=n(15),ft=n(165),pt=n(41),gt=n(39),mt=n(93),vt=n(20),_t=n(73),bt=function(){function e(t){Object(Y.a)(this,e),this.value=t}return Object($.a)(e,[{key:"equals",value:function(e){return this.value===e.value}},{key:"contains",value:function(t){return this.equals(t)||""===this.value||Object(ht.S)(t.value,this.value+e.sep)}},{key:"intersects",value:function(e){return this.contains(e)||e.contains(this)}},{key:"append",value:function(t){return new e(this.value+e.sep+t)}}]),e}();function yt(e,t){var n=t.kind?new bt(t.kind):void 0;return!!(!e.include||n&&e.include.contains(n))&&(!(e.excludes&&n&&e.excludes.some((function(t){return St(n,t,e.include)})))&&(!(!e.includeSourceActions&&n&&bt.Source.contains(n))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))}function St(e,t,n){return!!t.contains(e)&&(!n||!t.contains(n))}bt.sep=".",bt.None=new bt("@@none@@"),bt.Empty=new bt(""),bt.QuickFix=new bt("quickfix"),bt.Refactor=new bt("refactor"),bt.Source=new bt("source"),bt.SourceOrganizeImports=bt.Source.append("organizeImports"),bt.SourceFixAll=bt.Source.append("fixAll");var Ct=function(){function e(t,n,r){Object(Y.a)(this,e),this.kind=t,this.apply=n,this.preferred=r}return Object($.a)(e,null,[{key:"fromUser",value:function(t,n){return t&&"object"===typeof t?new e(e.getKindFromUser(t,n.kind),e.getApplyFromUser(t,n.apply),e.getPreferredUser(t)):new e(n.kind,n.apply,!1)}},{key:"getApplyFromUser",value:function(e,t){switch("string"===typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}},{key:"getKindFromUser",value:function(e,t){return"string"===typeof e.kind?new bt(e.kind):t}},{key:"getPreferredUser",value:function(e){return"boolean"===typeof e.preferred&&e.preferred}}]),e}(),kt=n(89),Et=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},wt="editor.action.codeAction",Ot="editor.action.refactor",Tt="editor.action.sourceAction",xt="editor.action.organizeImports",Nt="editor.action.fixAll",Dt=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this)).documentation=r,o._register(i),o.allActions=Object(ne.p)(Object(ct.a)(e),n.codeActionsComparator),o.validActions=o.allActions.filter((function(e){return!e.disabled})),o}return Object($.a)(n,[{key:"hasAutoFix",get:function(){return this.validActions.some((function(e){return!!e.kind&&bt.QuickFix.contains(new bt(e.kind))&&!!e.isPreferred}))}}],[{key:"codeActionsComparator",value:function(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:Object(ne.o)(e.diagnostics)?Object(ne.o)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:Object(ne.o)(t.diagnostics)?1:0}}]),n}(we.a),Lt={actions:[],documentation:void 0};function At(e,t,n,r,i){var o,a=this,s=n.filter||{},l={only:null===(o=s.include)||void 0===o?void 0:o.value,trigger:n.type},c=new mt.d(e,i),u=function(e,t){return vt.a.all(e).filter((function(e){return!e.providedCodeActionKinds||e.providedCodeActionKinds.some((function(e){return function(e,t){return!(e.include&&!e.include.intersects(t))&&(!e.excludes||!e.excludes.some((function(n){return St(t,n,e.include)})))&&!(!e.includeSourceActions&&bt.Source.contains(t))}(t,new bt(e))}))}))}(e,s),d=new we.b,h=u.map((function(n){return Et(a,void 0,void 0,G.a.mark((function i(){var o,a,u;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,r.report(n),i.next=4,n.provideCodeActions(e,t,l,c.token);case 4:if((o=i.sent)&&d.add(o),!c.token.isCancellationRequested){i.next=8;break}return i.abrupt("return",Lt);case 8:return a=((null===o||void 0===o?void 0:o.actions)||[]).filter((function(e){return e&&yt(s,e)})),u=It(n,a,s.include),i.abrupt("return",{actions:a,documentation:u});case 13:if(i.prev=13,i.t0=i.catch(0),!Object(ie.d)(i.t0)){i.next=17;break}throw i.t0;case 17:return Object(ie.f)(i.t0),i.abrupt("return",Lt);case 19:case"end":return i.stop()}}),i,null,[[0,13]])})))})),f=vt.a.onDidChange((function(){var t=vt.a.all(e);Object(ne.g)(t,u)||c.cancel()}));return Promise.all(h).then((function(e){var t=Object(ne.l)(e.map((function(e){return e.actions}))),n=Object(ne.d)(e.map((function(e){return e.documentation})));return new Dt(t,n,d)})).finally((function(){f.dispose(),c.dispose()}))}function It(e,t,n){if(e.documentation){var r=e.documentation.map((function(e){return{kind:new bt(e.kind),command:e.command}}));if(n){var i,o,a=Object(Ce.a)(r);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.kind.contains(n)&&(i?i.kind.contains(s.kind)&&(i=s):i=s)}}catch(p){a.e(p)}finally{a.f()}if(i)return null===i||void 0===i?void 0:i.command}var l,c=Object(Ce.a)(t);try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u.kind){var d,h=Object(Ce.a)(r);try{for(h.s();!(d=h.n()).done;){var f=d.value;if(f.kind.contains(new bt(u.kind)))return f.command}}catch(p){h.e(p)}finally{h.f()}}}}catch(p){c.e(p)}finally{c.f()}}}Object(Q.o)("_executeCodeActionProvider",(function(e,t){return Et(this,void 0,void 0,G.a.mark((function n(){var r,i,o,a,s,l;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t.resource,i=t.rangeOrSelection,o=t.kind,r instanceof gt.a){n.next=3;break}throw Object(ie.b)();case 3:if(a=e.get(_t.a).getModel(r)){n.next=6;break}throw Object(ie.b)();case 6:if(s=J.a.isISelection(i)?J.a.liftSelection(i):Te.a.isIRange(i)?a.validateRange(i):void 0){n.next=9;break}throw Object(ie.b)();case 9:return n.next=11,At(a,s,{type:2,filter:{includeSourceActions:!0,include:o&&o.value?new bt(o.value):void 0}},kt.b.None,pt.a.None);case 11:return l=n.sent,setTimeout((function(){return l.dispose()}),100),n.abrupt("return",l.validActions);case 14:case"end":return n.stop()}}),n)})))}));var Rt=n(17),Mt=n(16),Pt=(n(487),function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}),jt=function(e,t){return function(n,r){t(n,r,e)}},Ft=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._messageWidget=i._register(new we.d),i._messageListeners=i._register(new we.b),i._editor=e,i._visible=n.MESSAGE_VISIBLE.bindTo(r),i._register(i._editor.onDidAttemptReadOnlyEdit((function(){return i._onDidAttemptReadOnlyEdit()}))),i}return Object($.a)(n,[{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this._visible.reset()}},{key:"showMessage",value:function(e,t){var n,r=this;Object(he.a)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Ut(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidDispose((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeModel((function(){return r.closeMessage()}))),this._messageListeners.add(new Ee.e((function(){return r.closeMessage()}),3e3)),this._messageListeners.add(this._editor.onMouseMove((function(e){e.target.position&&(n?n.containsPosition(e.target.position)||r.closeMessage():n=new Te.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}},{key:"closeMessage",value:function(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Ut.fadeOut(this._messageWidget.value))}},{key:"_onDidAttemptReadOnlyEdit",value:function(){this._editor.hasModel()&&this.showMessage(Z.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);Ft.ID="editor.contrib.messageController",Ft.MESSAGE_VISIBLE=new te.c("messageVisible",!1),Ft=Pt([jt(1,te.b)],Ft);var Bt=Q.c.bindToContribution(Ft.get);Object(Q.l)(new Bt({id:"leaveEditorMessage",precondition:Ft.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var Ut=function(){function e(t,n,r){var i=n.lineNumber,o=n.column;Object(Y.a)(this,e),this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=t,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:o-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var a=document.createElement("div");a.classList.add("message"),a.textContent=r,this._domNode.appendChild(a);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return Object($.a)(e,[{key:"dispose",value:function(){this._editor.removeContentWidget(this)}},{key:"getId",value:function(){return"messageoverlay"}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return{position:this._position,preference:[1,2]}}}],[{key:"fadeOut",value:function(e){var t,n=function n(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}}]),e}();Object(Q.m)(Ft.ID,Ft),Object(Ae.g)((function(e,t){var n=e.getColor(Le.mb);if(n){var r=e.type===Ae.b?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: ".concat(n,"; }")),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: ".concat(r,"px solid ").concat(n,"; }"))}var i=e.getColor(Le.lb);i&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: ".concat(i,"; }"));var o=e.getColor(Le.nb);o&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { color: ".concat(o,"; }"))}));var Ht=n(29),zt=n(3),Vt=n(69),Wt=n(90),Gt=n(60),qt=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Kt=function(e,t){return function(n,r){t(n,r,e)}},Yt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},$t=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e.command?e.command.id:e.title,e.title,void 0,!e.disabled,r)).action=e,i}return n}(Vt.a),Qt=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._delegate=r,a._contextMenuService=i,a._visible=!1,a._showingActions=a._register(new we.d),a._keybindingResolver=new Zt({getKeybindings:function(){return o.getKeybindings()}}),a}return Object($.a)(n,[{key:"show",value:function(e,t,n,r){return Yt(this,void 0,void 0,G.a.mark((function i(){var o,a,s,l,c=this;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if((o=r.includeDisabledActions?t.allActions:t.validActions).length){i.next=4;break}return this._visible=!1,i.abrupt("return");case 4:if(this._editor.getDomNode()){i.next=7;break}throw this._visible=!1,Object(ie.a)();case 7:this._visible=!0,this._showingActions.value=t,a=this.getMenuActions(e,o,t.documentation),s=Oe.a.isIPosition(n)?this._toCoords(n):n||{x:0,y:0},l=this._keybindingResolver.getResolver(),this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:function(){return s},getActions:function(){return a},onHide:function(){c._visible=!1,c._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:function(e){return e instanceof $t?l(e.action):void 0}});case 13:case"end":return i.stop()}}),i,this)})))}},{key:"getMenuActions",value:function(e,t,n){var r,i,o=this,a=function(e){return new $t(e,(function(){return o._delegate.onSelectCodeAction(e)}))},s=t.map(a),l=Object(ct.a)(n),c=this._editor.getModel();if(c&&s.length){var u,d=Object(Ce.a)(vt.a.all(c));try{for(d.s();!(u=d.n()).done;){var h=u.value;h._getAdditionalMenuItems&&l.push.apply(l,Object(ct.a)(h._getAdditionalMenuItems({trigger:e.type,only:null===(i=null===(r=e.filter)||void 0===r?void 0:r.include)||void 0===i?void 0:i.value},t)))}}catch(f){d.e(f)}finally{d.f()}}return l.length&&s.push.apply(s,[new Vt.c].concat(Object(ct.a)(l.map((function(e){return a({title:e.title,command:e})}))))),s}},{key:"_toCoords",value:function(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();var t=this._editor.getScrolledVisiblePosition(e),n=Object(zt.getDomNodePagePosition)(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}},{key:"isVisible",get:function(){return this._visible}}]),n}(we.a);Qt=qt([Kt(2,Wt.a),Kt(3,Gt.a)],Qt);var Zt=function(){function e(t){Object(Y.a)(this,e),this._keybindingProvider=t}return Object($.a)(e,[{key:"getResolver",value:function(){var t=this,n=new dt((function(){return t._keybindingProvider.getKeybindings().filter((function(t){return e.codeActionCommands.indexOf(t.command)>=0})).filter((function(e){return e.resolvedKeybinding})).map((function(e){var t=e.commandArgs;return e.command===xt?t={kind:bt.SourceOrganizeImports.value}:e.command===Nt&&(t={kind:bt.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},Ct.fromUser(t,{kind:bt.None,apply:"never"}))}))}));return function(e){if(e.kind){var r=t.bestKeybindingForCodeAction(e,n.getValue());return null===r||void 0===r?void 0:r.resolvedKeybinding}}}},{key:"bestKeybindingForCodeAction",value:function(e,t){if(e.kind){var n=new bt(e.kind);return t.filter((function(e){return e.kind.contains(n)})).filter((function(t){return!t.preferred||e.isPreferred})).reduceRight((function(e,t){return e?e.kind.contains(t.kind)?t:e:t}),void 0)}}}]),e}();Zt.codeActionCommands=[Ot,wt,Tt,xt,Nt];var Xt,Jt=n(107),en=n(12),tn=(n(488),n(70)),nn=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},rn=function(e,t){return function(n,r){t(n,r,e)}};!function(e){e.Hidden={type:0};e.Showing=function e(t,n,r,i){Object(Y.a)(this,e),this.actions=t,this.trigger=n,this.editorPosition=r,this.widgetPosition=i,this.type=1}}(Xt||(Xt={}));var on=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._quickFixActionId=r,a._preferredFixActionId=i,a._keybindingService=o,a._onClick=a._register(new en.a),a.onClick=a._onClick.event,a._state=Xt.Hidden,a._domNode=document.createElement("div"),a._domNode.className=re.a.lightBulb.classNames,a._editor.addContentWidget(Object(ut.a)(a)),a._register(a._editor.onDidChangeModelContent((function(e){var t=a._editor.getModel();(1!==a.state.type||!t||a.state.editorPosition.lineNumber>=t.getLineCount())&&a.hide()}))),tn.b.ignoreTarget(a._domNode),a._register(zt.addStandardDisposableGenericMouseDownListner(a._domNode,(function(e){if(1===a.state.type){a._editor.focus(),e.preventDefault();var t=zt.getDomNodePagePosition(a._domNode),n=t.top,r=t.height,i=a._editor.getOption(51),o=Math.floor(i/3);null!==a.state.widgetPosition.position&&a.state.widgetPosition.position.lineNumber2&&i._editor.getTopForLineNumber(e)===i._editor.getTopForLineNumber(e-1)},g=l;if(!(d.spaceWidth*f>22))if(l>1&&!p(l-1))g-=1;else if(p(l+1)){if(c*d.spaceWidth<22)return this.hide()}else g+=1;this.state=new Xt.Showing(e,t,r,{position:{lineNumber:g,column:1},preference:n._posPref}),this._editor.layoutContentWidget(this)}},{key:"hide",value:function(){this.state=Xt.Hidden,this._editor.layoutContentWidget(this)}},{key:"_updateLightBulbTitleAndIcon",value:function(){if(1===this.state.type&&this.state.actions.hasAutoFix){zt.removeClasses(this._domNode,re.a.lightBulb.classNames),zt.addClasses(this._domNode,re.a.lightbulbAutofix.classNames);var e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=Z.a("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",e.getLabel()))}zt.removeClasses(this._domNode,re.a.lightbulbAutofix.classNames),zt.addClasses(this._domNode,re.a.lightBulb.classNames);var t=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=t?Z.a("quickFixWithKb","Show Fixes ({0})",t.getLabel()):Z.a("quickFix","Show Fixes")}},{key:"state",get:function(){return this._state},set:function(e){this._state=e,this._updateLightBulbTitleAndIcon()}},{key:"title",set:function(e){this._domNode.title=e}}]),n}(we.a);on._posPref=[0],on=nn([rn(3,Gt.a)],on),Object(Ae.g)((function(e,t){var n=e.getColor(Le.N);n&&t.addRule("\n\t\t.monaco-editor .contentWidgets ".concat(re.a.lightBulb.cssSelector," {\n\t\t\tcolor: ").concat(n,";\n\t\t}"));var r=e.getColor(Le.M);r&&t.addRule("\n\t\t.monaco-editor .contentWidgets ".concat(re.a.lightbulbAutofix.cssSelector," {\n\t\t\tcolor: ").concat(r,";\n\t\t}"))}));var an=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},sn=function(e,t){return function(n,r){t(n,r,e)}},ln=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},cn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a){var s;return Object(Y.a)(this,n),(s=t.call(this))._editor=e,s.delegate=o,s._activeCodeActions=s._register(new we.d),s._codeActionWidget=new dt((function(){return s._register(a.createInstance(Qt,s._editor,{onSelectCodeAction:function(e){return ln(Object(ut.a)(s),void 0,void 0,G.a.mark((function t(){return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.delegate.applyCodeAction(e,!0);case 1:case"end":return t.stop()}}),t,this)})))}}))})),s._lightBulbWidget=new dt((function(){var e=s._register(a.createInstance(on,s._editor,r,i));return s._register(e.onClick((function(e){return s.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})}))),e})),s}return Object($.a)(n,[{key:"update",value:function(e){var t,n,r;return ln(this,void 0,void 0,G.a.mark((function i(){var o,a,s,l;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(1===e.type){i.next=3;break}return null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide(),i.abrupt("return");case 3:return i.prev=3,i.next=6,e.actions;case 6:o=i.sent,i.next=13;break;case 9:return i.prev=9,i.t0=i.catch(3),Object(ie.e)(i.t0),i.abrupt("return");case 13:if(this._lightBulbWidget.getValue().update(o,e.trigger,e.position),2!==e.trigger.type){i.next=42;break}if(!(null===(n=e.trigger.filter)||void 0===n?void 0:n.include)){i.next=31;break}if(!(a=this.tryGetValidActionToApply(e.trigger,o))){i.next=25;break}return i.prev=18,i.next=21,this.delegate.applyCodeAction(a,!1);case 21:return i.prev=21,o.dispose(),i.finish(21);case 24:return i.abrupt("return");case 25:if(!e.trigger.context){i.next=31;break}if(!(s=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,o))||!s.disabled){i.next=31;break}return Ft.get(this._editor).showMessage(s.disabled,e.trigger.context.position),o.dispose(),i.abrupt("return");case 31:if(l=!!(null===(r=e.trigger.filter)||void 0===r?void 0:r.include),!e.trigger.context){i.next=38;break}if(o.allActions.length&&(l||o.validActions.length)){i.next=38;break}return Ft.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=o,o.dispose(),i.abrupt("return");case 38:this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(e.trigger,o,e.position,{includeDisabledActions:l}),i.next=43;break;case 42:this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o;case 43:case"end":return i.stop()}}),i,this,[[3,9],[18,,21,24]])})))}},{key:"getInvalidActionThatWouldHaveBeenApplied",value:function(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((function(e){return e.disabled})):void 0}},{key:"tryGetValidActionToApply",value:function(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}},{key:"showCodeActionList",value:function(e,t,n,r){return ln(this,void 0,void 0,G.a.mark((function i(){return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:this._codeActionWidget.getValue().show(e,t,n,r);case 1:case"end":return i.stop()}}),i,this)})))}}]),n}(we.a);cn=an([sn(4,Ht.a)],cn);var un,dn=n(44),hn=n(72),fn=n(59),pn=n(128),gn=n(61),mn=new te.c("supportedCodeAction",""),vn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:250;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._markerService=r,o._signalChange=i,o._delay=a,o._autoTriggerTimer=o._register(new Ee.e),o._register(o._markerService.onMarkerChanged((function(e){return o._onMarkerChanges(e)}))),o._register(o._editor.onDidChangeCursorPosition((function(){return o._onCursorChange()}))),o}return Object($.a)(n,[{key:"trigger",value:function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}},{key:"_onMarkerChanges",value:function(e){var t=this,n=this._editor.getModel();n&&e.some((function(e){return Object(gn.f)(e,n.uri)}))&&this._autoTriggerTimer.cancelAndSet((function(){t.trigger({type:1})}),this._delay)}},{key:"_onCursorChange",value:function(){var e=this;this._autoTriggerTimer.cancelAndSet((function(){e.trigger({type:1})}),this._delay)}},{key:"_getRangeOfMarker",value:function(e){var t=this._editor.getModel();if(t){var n,r=Object(Ce.a)(this._markerService.read({resource:t.uri}));try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t.validateRange(i);if(Te.a.intersectRanges(o,e))return Te.a.lift(o)}}catch(a){r.e(a)}finally{r.f()}}}},{key:"_getRangeOfSelectionUnlessWhitespaceEnclosed",value:function(e){if(this._editor.hasModel()){var t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&1===e.type){var r=n.getPosition(),i=r.lineNumber,o=r.column,a=t.getLineContent(i);if(0===a.length)return;if(1===o){if(/\s/.test(a[0]))return}else if(o===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[o-2])&&/\s/.test(a[o-1]))return}return n}}},{key:"_createEventAndSignalChange",value:function(e,t){var n=this._editor.getModel();if(t&&n){var r=this._getRangeOfMarker(t),i=r?r.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:i};return this._signalChange(o),o}this._signalChange(void 0)}}]),n}(we.a);!function(e){e.Empty={type:0};e.Triggered=function e(t,n,r,i){Object(Y.a)(this,e),this.trigger=t,this.rangeOrSelection=n,this.position=r,this.actions=i,this.type=1}}(un||(un={}));var _n=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._markerService=r,a._progressService=o,a._codeActionOracle=a._register(new we.d),a._state=un.Empty,a._onDidChangeState=a._register(new en.a),a.onDidChangeState=a._onDidChangeState.event,a._supportedCodeActions=mn.bindTo(i),a._register(a._editor.onDidChangeModel((function(){return a._update()}))),a._register(a._editor.onDidChangeModelLanguage((function(){return a._update()}))),a._register(vt.a.onDidChange((function(){return a._update()}))),a._update(),a}return Object($.a)(n,[{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this.setState(un.Empty,!0)}},{key:"_update",value:function(){var e=this;this._codeActionOracle.value=void 0,this.setState(un.Empty);var t=this._editor.getModel();if(t&&vt.a.has(t)&&!this._editor.getOption(72)){var n,r=[],i=Object(Ce.a)(vt.a.all(t));try{for(i.s();!(n=i.n()).done;){var o=n.value;Array.isArray(o.providedCodeActionKinds)&&r.push.apply(r,Object(ct.a)(o.providedCodeActionKinds))}}catch(a){i.e(a)}finally{i.f()}this._supportedCodeActions.set(r.join(" ")),this._codeActionOracle.value=new vn(this._editor,this._markerService,(function(n){var r;if(n){var i=Object(Ee.f)((function(e){return At(t,n.selection,n.trigger,kt.b.None,e)}));2===n.trigger.type&&(null===(r=e._progressService)||void 0===r||r.showWhile(i,250)),e.setState(new un.Triggered(n.trigger,n.selection,n.position,i))}else e.setState(un.Empty)}),void 0),this._codeActionOracle.value.trigger({type:1})}else this._supportedCodeActions.reset()}},{key:"trigger",value:function(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}},{key:"setState",value:function(e,t){e!==this._state&&(1===this._state.type&&this._state.actions.cancel(),this._state=e,t||this._onDidChangeState.fire(e))}}]),n}(we.a),bn=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},yn=function(e,t){return function(n,r){t(n,r,e)}},Sn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function Cn(e){return te.a.regex(mn.keys()[0],new RegExp("(\\s|^)"+Object(ht.v)(e.value)+"\\b"))}var kn={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:Z.a("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:Z.a("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[Z.a("args.schema.apply.first","Always apply the first returned code action."),Z.a("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),Z.a("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:Z.a("args.schema.preferred","Controls if only preferred code actions should be returned.")}}},En=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a){var s;return Object(Y.a)(this,n),(s=t.call(this))._instantiationService=a,s._editor=e,s._model=s._register(new _n(s._editor,r,i,o)),s._register(s._model.onDidChangeState((function(e){return s.update(e)}))),s._ui=new dt((function(){return s._register(new cn(e,xn.Id,Rn.Id,{applyCodeAction:function(e,t){return Sn(Object(ut.a)(s),void 0,void 0,G.a.mark((function n(){return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this._applyCodeAction(e);case 3:return n.prev=3,t&&this._trigger({type:1,filter:{}}),n.finish(3);case 6:case"end":return n.stop()}}),n,this,[[0,,3,6]])})))}},s._instantiationService))})),s}return Object($.a)(n,[{key:"update",value:function(e){this._ui.getValue().update(e)}},{key:"showCodeActions",value:function(e,t,n){return this._ui.getValue().showCodeActionList(e,t,n,{includeDisabledActions:!1})}},{key:"manualTriggerAtCurrentPosition",value:function(e,t,n){if(this._editor.hasModel()){Ft.get(this._editor).closeMessage();var r=this._editor.getPosition();this._trigger({type:2,filter:t,autoApply:n,context:{notAvailableMessage:e,position:r}})}}},{key:"_trigger",value:function(e){return this._model.trigger(e)}},{key:"_applyCodeAction",value:function(e){return this._instantiationService.invokeFunction(wn,e,this._editor)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);function wn(e,t,n){return Sn(this,void 0,void 0,G.a.mark((function r(){var i,o,a,s,l;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=e.get(ft.a),o=e.get(dn.b),a=e.get(pn.a),s=e.get(fn.a),a.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.title,codeActionKind:t.kind,codeActionIsPreferred:!!t.isPreferred}),!t.edit){r.next=8;break}return r.next=8,i.apply(ft.b.convert(t.edit),{editor:n,label:t.title});case 8:if(!t.command){r.next=18;break}return r.prev=9,r.next=12,o.executeCommand.apply(o,[t.command.id].concat(Object(ct.a)(t.command.arguments||[])));case 12:r.next=18;break;case 14:r.prev=14,r.t0=r.catch(9),l=On(r.t0),s.error("string"===typeof l?l:Z.a("applyCodeActionFailed","An unknown error occurred while applying the code action"));case 18:case"end":return r.stop()}}),r,null,[[9,14]])})))}function On(e){return"string"===typeof e?e:e instanceof Error&&"string"===typeof e.message?e.message:void 0}function Tn(e,t,n,r){if(e.hasModel()){var i=En.get(e);i&&i.manualTriggerAtCurrentPosition(t,n,r)}}En.ID="editor.contrib.quickFixController",En=bn([yn(1,hn.b),yn(2,te.b),yn(3,kt.a),yn(4,Ht.a)],En);var xn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.Id,label:Z.a("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:2132,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Tn(t,Z.a("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}]),n}(Q.b);xn.Id="editor.action.quickFix";var Nn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:wt,precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:kn}]}})}return Object($.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=Ct.fromUser(n,{kind:bt.Empty,apply:"ifSingle"});return Tn(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Z.a("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):Z.a("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?Z.a("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):Z.a("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}(Q.c),Dn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Ot,label:Z.a("refactor.label","Refactor..."),alias:"Refactor...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:te.a.and(X.a.writable,Cn(bt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:kn}]}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){var r=Ct.fromUser(n,{kind:bt.Refactor,apply:"never"});return Tn(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Z.a("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):Z.a("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?Z.a("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):Z.a("editor.action.refactor.noneMessage","No refactorings available"),{include:bt.Refactor.contains(r.kind)?r.kind:bt.None,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}(Q.b),Ln=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Tt,label:Z.a("source.label","Source Action..."),alias:"Source Action...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:te.a.and(X.a.writable,Cn(bt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:kn}]}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){var r=Ct.fromUser(n,{kind:bt.Source,apply:"never"});return Tn(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Z.a("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):Z.a("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?Z.a("editor.action.source.noneMessage.preferred","No preferred source actions available"):Z.a("editor.action.source.noneMessage","No source actions available"),{include:bt.Source.contains(r.kind)?r.kind:bt.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}(Q.b),An=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:xt,label:Z.a("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:te.a.and(X.a.writable,Cn(bt.SourceOrganizeImports)),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1581,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Tn(t,Z.a("editor.action.organize.noneMessage","No organize imports action available"),{include:bt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}]),n}(Q.b),In=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Nt,label:Z.a("fixAll.label","Fix All"),alias:"Fix All",precondition:te.a.and(X.a.writable,Cn(bt.SourceFixAll))})}return Object($.a)(n,[{key:"run",value:function(e,t){return Tn(t,Z.a("fixAll.noneMessage","No fix all action available"),{include:bt.SourceFixAll,includeSourceActions:!0},"ifSingle")}}]),n}(Q.b),Rn=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.Id,label:Z.a("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:te.a.and(X.a.writable,Cn(bt.QuickFix)),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Tn(t,Z.a("editor.action.autoFix.noneMessage","No auto fixes available"),{include:bt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}]),n}(Q.b);Rn.Id="editor.action.autoFix",Object(Q.m)(En.ID,En),Object(Q.k)(xn),Object(Q.k)(Dn),Object(Q.k)(Ln),Object(Q.k)(An),Object(Q.k)(Rn),Object(Q.k)(In),Object(Q.l)(new Nn);var Mn=function(){function e(){Object(Y.a)(this,e),this.lenses=[],this._disposables=new we.b}return Object($.a)(e,[{key:"dispose",value:function(){this._disposables.dispose()}},{key:"add",value:function(e,t){this._disposables.add(e);var n,r=Object(Ce.a)(e.lenses);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.lenses.push({symbol:i,provider:t})}}catch(o){r.e(o)}finally{r.f()}}}]),e}();function Pn(e,t){var n=vt.b.ordered(e),r=new Map,i=new Mn,o=n.map((function(n,o){return r.set(n,o),Promise.resolve(n.provideCodeLenses(e,t)).then((function(e){return e&&i.add(e,n)})).catch(ie.f)}));return Promise.all(o).then((function(){return i.lenses=Object(ne.p)(i.lenses,(function(e,t){return e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:r.get(e.provider)r.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})),i}))}Object(Q.o)("_executeCodeLensProvider",(function(e,t){var n=t.resource,r=t.itemResolveCount;if(!(n instanceof gt.a))throw Object(ie.b)();var i=e.get(_t.a).getModel(n);if(!i)throw Object(ie.b)();var o=[],a=new we.b;return Pn(i,pt.a.None).then((function(e){a.add(e);var t,n=[],s=Object(Ce.a)(e.lenses);try{var l=function(){var e=t.value;"undefined"===typeof r||Boolean(e.symbol.command)?o.push(e.symbol):r-- >0&&e.provider.resolveCodeLens&&n.push(Promise.resolve(e.provider.resolveCodeLens(i,e.symbol,pt.a.None)).then((function(t){return o.push(t||e.symbol)})))};for(s.s();!(t=s.n()).done;)l()}catch(c){s.e(c)}finally{s.f()}return Promise.all(n)})).then((function(){return o})).finally((function(){setTimeout((function(){return a.dispose()}),100)}))}));n(489);var jn=function(){function e(t,n){Object(Y.a)(this,e),this.afterLineNumber=t,this._onHeight=n,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return Object($.a)(e,[{key:"onComputedHeight",value:function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}]),e}(),Fn=function(){function e(t,n,r){Object(Y.a)(this,e),this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id="codelens.widget-".concat(e._idPool++),this.updatePosition(r),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration ".concat(n)}return Object($.a)(e,[{key:"withCommands",value:function(e,t){this._commands.clear();for(var n="",r=!1,i=0;i").concat(a,""),this._commands.set(String(i),o.command)):n+="".concat(a,""),i+1 | 
")}}r?(n||(n="\xa0"),this._domNode.innerHTML=n,this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):this._domNode.innerHTML="no commands"}},{key:"getCommand",value:function(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}},{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._domNode}},{key:"updatePosition",value:function(e){var t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}},{key:"getPosition",value:function(){return this._widgetPosition||null}}]),e}();Fn._idPool=0;var Bn=function(){function e(){Object(Y.a)(this,e),this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return Object($.a)(e,[{key:"addDecoration",value:function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}},{key:"removeDecoration",value:function(e){this._removeDecorations.push(e)}},{key:"commit",value:function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,r=t.length;n0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}return Object($.a)(e,[{key:"_createContentWidgetIfNecessary",value:function(){this._contentWidget||(this._contentWidget=new Fn(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}},{key:"dispose",value:function(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}},{key:"isDisposed",value:function(){return this._isDisposed}},{key:"isValid",value:function(){var e=this;return this._decorationIds.some((function(t,n){var r=e._editor.getModel().getDecorationRange(t),i=e._data[n].symbol;return!(!r||Te.a.isEmpty(i.range)!==r.isEmpty())}))}},{key:"updateCodeLensSymbols",value:function(e,t){var n=this;this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((function(e,r){t.addDecoration({range:e.symbol.range,options:Ne.a.EMPTY},(function(e){return n._decorationIds[r]=e}))}))}},{key:"computeIfNecessary",value:function(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(var t=0;t a:hover { color: ".concat(r," !important; }")),t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: ".concat(r," !important; }")))}));var Hn=n(121),zn=n(84),Vn=n(103),Wn=n(145),Gn=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},qn=function(e,t){return function(n,r){t(n,r,e)}},Kn=Object(Ht.c)("ICodeLensCache"),Yn=function e(t,n){Object(Y.a)(this,e),this.lineCount=t,this.data=n},$n=function(){function e(t){var n=this;Object(Y.a)(this,e),this._fakeProvider=new(function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"provideCodeLenses",value:function(){throw new Error("not supported")}}]),e}()),this._cache=new zn.a(20,.75);Object(Ee.k)((function(){return t.remove("codelens/cache",1)}));var r="codelens/cache2",i=t.get(r,1,"{}");this._deserialize(i),Object(Wn.a)(t.onWillSaveState)((function(e){e.reason===Vn.c.SHUTDOWN&&t.store(r,n._serialize(),1)}))}return Object($.a)(e,[{key:"put",value:function(e,t){var n=t.lenses.map((function(e){var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),r=new Mn;r.add({lenses:n,dispose:function(){}},this._fakeProvider);var i=new Yn(e.getLineCount(),r);this._cache.set(e.uri.toString(),i)}},{key:"get",value:function(e){var t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}},{key:"delete",value:function(e){this._cache.delete(e.uri.toString())}},{key:"_serialize",value:function(){var e,t=Object.create(null),n=Object(Ce.a)(this._cache);try{for(n.s();!(e=n.n()).done;){var r,i=Object(ke.a)(e.value,2),o=i[0],a=i[1],s=new Set,l=Object(Ce.a)(a.data.lenses);try{for(l.s();!(r=l.n()).done;){var c=r.value;s.add(c.symbol.range.startLineNumber)}}catch(u){l.e(u)}finally{l.f()}t[o]={lineCount:a.lineCount,lines:Object(ct.a)(s.values())}}}catch(u){n.e(u)}finally{n.f()}return JSON.stringify(t)}},{key:"_deserialize",value:function(e){try{var t=JSON.parse(e);for(var n in t){var r,i=t[n],o=[],a=Object(Ce.a)(i.lines);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push({range:new Te.a(s,1,s,11)})}}catch(c){a.e(c)}finally{a.f()}var l=new Mn;l.add({lenses:o,dispose:function(){}},this._fakeProvider),this._cache.set(n,new Yn(i.lineCount,l))}}catch(u){}}}]),e}();$n=Gn([qn(0,Vn.a)],$n),Object(Hn.b)(Kn,$n);var Qn=n(185),Zn=n(116),Xn=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Jn=function(e,t){return function(n,r){t(n,r,e)}},er=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},tr=function(){function e(t,n,r,i){var o=this;Object(Y.a)(this,e),this._editor=t,this._commandService=n,this._notificationService=r,this._codeLensCache=i,this._globalToDispose=new we.b,this._localToDispose=new we.b,this._lenses=[],this._oldCodeLensModels=new we.b,this._modelChangeCounter=0,this._isEnabled=this._editor.getOption(11),this._globalToDispose.add(this._editor.onDidChangeModel((function(){return o._onModelChange()}))),this._globalToDispose.add(this._editor.onDidChangeModelLanguage((function(){return o._onModelChange()}))),this._globalToDispose.add(this._editor.onDidChangeConfiguration((function(){var e=o._isEnabled;o._isEnabled=o._editor.getOption(11),e!==o._isEnabled&&o._onModelChange()}))),this._globalToDispose.add(vt.b.onDidChange(this._onModelChange,this)),this._globalToDispose.add(this._editor.onDidChangeConfiguration((function(e){e.hasChanged(36)&&o._updateLensStyle()}))),this._onModelChange(),this._styleClassName="_"+Object(Qn.b)(this._editor.getId()).toString(16),this._styleElement=zt.createStyleSheet(zt.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}return Object($.a)(e,[{key:"dispose",value:function(){this._localDispose(),this._globalToDispose.dispose(),this._oldCodeLensModels.dispose(),Object(we.f)(this._currentCodeLensModel)}},{key:"_updateLensStyle",value:function(){var e=this._editor.getOptions(),t=e.get(36),n=e.get(51),r=Math.round(1.1*n),i=Math.round(.9*t.fontSize),o="\n\t\t.monaco-editor .codelens-decoration.".concat(this._styleClassName," { height: ").concat(r,"px; line-height: ").concat(n,"px; font-size: ").concat(i,"px; padding-right: ").concat(Math.round(.45*t.fontSize),"px;}\n\t\t.monaco-editor .codelens-decoration.").concat(this._styleClassName," > a > .codicon { line-height: ").concat(n,"px; font-size: ").concat(i,"px; }\n\t\t");this._styleElement.textContent=o}},{key:"_localDispose",value:function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=void 0,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=void 0),this._localToDispose.clear(),this._oldCodeLensModels.clear(),Object(we.f)(this._currentCodeLensModel)}},{key:"_onModelChange",value:function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled){var n=this._codeLensCache.get(t);if(n&&this._renderCodeLensSymbols(n),vt.b.has(t)){var r,i=Object(Ce.a)(vt.b.all(t));try{for(i.s();!(r=i.n()).done;){var o=r.value;if("function"===typeof o.onDidChange){var a=o.onDidChange((function(){return l.schedule()}));this._localToDispose.add(a)}}}catch(c){i.e(c)}finally{i.f()}var s=this._detectVisibleLenses=new Ee.d((function(){return e._onViewportChanged()}),250),l=new Ee.d((function(){var n=++e._modelChangeCounter;e._currentFindCodeLensSymbolsPromise&&e._currentFindCodeLensSymbolsPromise.cancel(),e._currentFindCodeLensSymbolsPromise=Object(Ee.f)((function(e){return Pn(t,e)})),e._currentFindCodeLensSymbolsPromise.then((function(r){n===e._modelChangeCounter&&(e._currentCodeLensModel&&e._oldCodeLensModels.add(e._currentCodeLensModel),e._currentCodeLensModel=r,e._codeLensCache.put(t,r),e._renderCodeLensSymbols(r),s.schedule())}),ie.e)}),250);this._localToDispose.add(l),this._localToDispose.add(s),this._localToDispose.add(this._editor.onDidChangeModelContent((function(){e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){var r=[],i=-1;e._lenses.forEach((function(e){e.isValid()&&i!==e.getLineNumber()?(e.update(n),i=e.getLineNumber()):r.push(e)}));var o=new Bn;r.forEach((function(t){t.dispose(o,n),e._lenses.splice(e._lenses.indexOf(t),1)})),o.commit(t)}))})),s.schedule(),l.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((function(t){t.scrollTopChanged&&e._lenses.length>0&&s.schedule()}))),this._localToDispose.add(this._editor.onDidLayoutChange((function(){s.schedule()}))),this._localToDispose.add(Object(we.h)((function(){if(e._editor.getModel()){var t=mt.c.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseUp((function(t){if(9===t.target.type){var n=t.target.element;if("SPAN"===(null===n||void 0===n?void 0:n.tagName)&&(n=n.parentElement),"A"===(null===n||void 0===n?void 0:n.tagName)){var r,i=Object(Ce.a)(e._lenses);try{for(i.s();!(r=i.n()).done;){var o=r.value.getCommand(n);if(o){var a;(a=e._commandService).executeCommand.apply(a,[o.id].concat(Object(ct.a)(o.arguments||[]))).catch((function(t){return e._notificationService.error(t)}));break}}}catch(c){i.e(c)}finally{i.f()}}}}))),l.schedule()}else n&&this._localToDispose.add(Object(Ee.g)((function(){var r=e._codeLensCache.get(t);n===r&&(e._codeLensCache.delete(t),e._onModelChange())}),3e4))}}},{key:"_disposeAllLenses",value:function(e,t){var n,r=new Bn,i=Object(Ce.a)(this._lenses);try{for(i.s();!(n=i.n()).done;){n.value.dispose(r,t)}}catch(o){i.e(o)}finally{i.f()}e&&r.commit(e),this._lenses=[]}},{key:"_renderCodeLensSymbols",value:function(e){var t=this;if(this._editor.hasModel()){var n,r,i=this._editor.getModel().getLineCount(),o=[],a=Object(Ce.a)(e.lenses);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s.symbol.range.startLineNumber;l<1||l>i||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(s):(n=[s],o.push(n)))}}catch(u){a.e(u)}finally{a.f()}var c=mt.c.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var r=new Bn,i=0,a=0;a=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ar=function(e,t){return function(n,r){t(n,r,e)}},sr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._codeEditorService=r,o._configurationService=i,o._localToDispose=o._register(new we.b),o._decorationsIds=[],o._colorDatas=new Map,o._colorDecoratorIds=[],o._decorationsTypes=new Set,o._register(e.onDidChangeModel((function(e){o._isEnabled=o.isEnabled(),o.onModelChanged()}))),o._register(e.onDidChangeModelLanguage((function(e){return o.onModelChanged()}))),o._register(vt.c.onDidChange((function(e){return o.onModelChanged()}))),o._register(e.onDidChangeConfiguration((function(e){var t=o._isEnabled;o._isEnabled=o.isEnabled(),t!==o._isEnabled&&(o._isEnabled?o.onModelChanged():o.removeAllDecorations())}))),o._timeoutTimer=null,o._computePromise=null,o._isEnabled=o.isEnabled(),o.onModelChanged(),o}return Object($.a)(n,[{key:"isEnabled",value:function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),n=this._configurationService.getValue(t.language);if(n){var r=n.colorDecorators;if(r&&void 0!==r.enable&&!r.enable)return r.enable}return this._editor.getOption(12)}},{key:"dispose",value:function(){this.stop(),this.removeAllDecorations(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"onModelChanged",value:function(){var e=this;if(this.stop(),this._isEnabled){var t=this._editor.getModel();t&&vt.c.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((function(t){e._timeoutTimer||(e._timeoutTimer=new Ee.e,e._timeoutTimer.cancelAndSet((function(){e._timeoutTimer=null,e.beginCompute()}),n.RECOMPUTE_TIME))}))),this.beginCompute())}}},{key:"beginCompute",value:function(){var e=this;this._computePromise=Object(Ee.f)((function(t){var n=e._editor.getModel();return n?function(e,t){var n=[],r=vt.c.ordered(e).reverse().map((function(r){return Promise.resolve(r.provideDocumentColors(e,t)).then((function(e){if(Array.isArray(e)){var t,i=Object(Ce.a)(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.push({colorInfo:o,provider:r})}}catch(a){i.e(a)}finally{i.f()}}}))}));return Promise.all(r).then((function(){return n}))}(n,t):Promise.resolve([])})),this._computePromise.then((function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null}),ie.e)}},{key:"stop",value:function(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}},{key:"updateDecorations",value:function(e){var t=this,n=e.map((function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:Ne.a.EMPTY}}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((function(n,r){return t._colorDatas.set(n,e[r])}))}},{key:"updateColorDecorators",value:function(e){for(var t=this,n=[],r={},i=0;i=0&&(p=-1,g=-1)}else{var m=h.substring(p+n.length),v=f.substring(0,g);(m.indexOf(r)>=0||v.indexOf(r)>=0)&&(p=-1,g=-1)}-1!==p&&-1!==g?(i&&p+n.length0&&32===f.charCodeAt(g-1)&&(r=" "+r,g-=1),s=e._createRemoveBlockCommentOperations(new Te.a(l,p+n.length+1,u,g+1),n,r)):(s=e._createAddBlockCommentOperations(t,n,r,this._insertSpace),this._usedEndToken=1===s.length?r:null);var _,b=Object(Ce.a)(s);try{for(b.s();!(_=b.n()).done;){var y=_.value;a.addTrackedEditOperation(y.range,y.text)}}catch(S){b.e(S)}finally{b.f()}}},{key:"getEditOperations",value:function(e,t){var n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenizeIfCheap(n);var i=e.getLanguageIdAtPosition(n,r),o=cr.a.getComments(i);o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations();if(2===n.length){var r=n[0],i=n[1];return new J.a(r.range.endLineNumber,r.range.endColumn,i.range.startLineNumber,i.range.startColumn)}var o=n[0].range,a=this._usedEndToken?-this._usedEndToken.length-1:0;return new J.a(o.endLineNumber,o.endColumn+a,o.endLineNumber,o.endColumn+a)}}],[{key:"_haystackHasNeedleAtOffset",value:function(e,t,n){if(n<0)return!1;var r=t.length;if(n+r>e.length)return!1;for(var i=0;i=65&&o<=90&&o+32===a)&&!(a>=65&&a<=90&&a+32===o)))return!1}return!0}},{key:"_createRemoveBlockCommentOperations",value:function(e,t,n){var r=[];return Te.a.isEmpty(e)?r.push(lr.a.delete(new Te.a(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(lr.a.delete(new Te.a(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(lr.a.delete(new Te.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}},{key:"_createAddBlockCommentOperations",value:function(e,t,n,r){var i=[];return Te.a.isEmpty(e)?i.push(lr.a.replace(new Te.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(i.push(lr.a.insert(new Oe.a(e.startLineNumber,e.startColumn),t+(r?" ":""))),i.push(lr.a.insert(new Oe.a(e.endLineNumber,e.endColumn),(r?" ":"")+n))),i}}]),e}(),dr=function(){function e(t,n,r,i,o){Object(Y.a)(this,e),this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=i,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o}return Object($.a)(e,[{key:"_executeLineComments",value:function(t,n,r,i){var o;r.shouldRemoveComments?o=e._createRemoveLineCommentsOperations(r.lines,i.startLineNumber):(e._normalizeInsertionPoint(t,r.lines,i.startLineNumber,this._tabSize),o=this._createAddLineCommentsOperations(r.lines,i.startLineNumber));for(var a=new Oe.a(i.positionLineNumber,i.positionColumn),s=0,l=o.length;ss?o-1:o}}}]),e}(),hr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._type=e,i}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n,r=t.getModel(),i=[],o=t.getSelections(),a=r.getOptions(),s=t.getOption(14),l=Object(Ce.a)(o);try{for(l.s();!(n=l.n()).done;){var c=n.value;i.push(new dr(c,a.tabSize,this._type,s.insertSpace,s.ignoreEmptyLines))}}catch(u){l.e(u)}finally{l.f()}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}}]),n}(Q.b),fr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,0,{id:"editor.action.commentLine",label:Z.a("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:Ie.b.MenubarEditMenu,group:"5_insert",title:Z.a({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}return n}(hr),pr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,1,{id:"editor.action.addCommentLine",label:Z.a("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2081),weight:100}})}return n}(hr),gr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,2,{id:"editor.action.removeCommentLine",label:Z.a("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2099),weight:100}})}return n}(hr),mr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.blockComment",label:Z.a("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Ie.b.MenubarEditMenu,group:"5_insert",title:Z.a({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n,r=t.getOption(14),i=[],o=t.getSelections(),a=Object(Ce.a)(o);try{for(a.s();!(n=a.n()).done;){var s=n.value;i.push(new ur(s,r.insertSpace))}}catch(l){a.e(l)}finally{a.f()}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}}]),n}(Q.b);Object(Q.k)(fr),Object(Q.k)(pr),Object(Q.k)(gr),Object(Q.k)(mr);var vr=n(132),_r=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},br=function(e,t){return function(n,r){t(n,r,e)}},yr=function(){function e(t,n,r,i,o,a){var s=this;Object(Y.a)(this,e),this._contextMenuService=n,this._contextViewService=r,this._contextKeyService=i,this._keybindingService=o,this._menuService=a,this._toDispose=new we.b,this._contextMenuIsBeingShownCount=0,this._editor=t,this._toDispose.add(this._editor.onContextMenu((function(e){return s._onContextMenu(e)}))),this._toDispose.add(this._editor.onMouseWheel((function(e){if(s._contextMenuIsBeingShownCount>0){var t=s._contextViewService.getContextViewElement(),n=e.srcElement;n.shadowRoot&&zt.getShadowRoot(t)===n.shadowRoot||s._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return Object($.a)(e,[{key:"_onContextMenu",value:function(e){if(this._editor.hasModel()){if(!this._editor.getOption(15))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12!==e.target.type&&(e.event.preventDefault(),6===e.target.type||7===e.target.type||1===e.target.type)){if(this._editor.focus(),e.target.position){var t,n=!1,r=Object(Ce.a)(this._editor.getSelections());try{for(r.s();!(t=r.n()).done;){if(t.value.containsPosition(e.target.position)){n=!0;break}}}catch(o){r.e(o)}finally{r.f()}n||this._editor.setPosition(e.target.position)}var i=null;1!==e.target.type&&(i={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(i)}}}},{key:"showContextMenu",value:function(e){if(this._editor.getOption(15)&&this._editor.hasModel())if(this._contextMenuService){var t=this._getMenuActions(this._editor.getModel(),Ie.b.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()}},{key:"_getMenuActions",value:function(e,t){var n=[],r=this._menuService.createMenu(t,this._contextKeyService),i=r.getActions({arg:e.uri});r.dispose();var o,a=Object(Ce.a)(i);try{for(a.s();!(o=a.n()).done;){var s,l=o.value,c=Object(ke.a)(l,2)[1],u=0,d=Object(Ce.a)(c);try{for(d.s();!(s=d.n()).done;){var h=s.value;if(h instanceof Ie.e){var f=this._getMenuActions(e,h.item.submenu);f.length>0&&(n.push(new Vt.d(h.id,h.label,f)),u++)}else n.push(h),u++}}catch(p){d.e(p)}finally{d.f()}u&&n.push(new Vt.c)}}catch(p){a.e(p)}finally{a.f()}return n.length&&n.pop(),n}},{key:"_doShowContextMenu",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this._editor.hasModel()){var r=this._editor.getOption(46);if(this._editor.updateOptions({hover:{enabled:!1}}),!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();var i=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=zt.getDomNodePagePosition(this._editor.getDomNode()),a=o.left+i.left,s=o.top+i.top+i.height;n={x:a,y:s}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:function(){return n},getActions:function(){return e},getActionViewItem:function(e){var n=t._keybindingFor(e);if(n)return new vr.a(e,e,{label:!0,keybinding:n.getLabel(),isMenu:!0});var r=e;return"function"===typeof r.getActionViewItem?r.getActionViewItem():new vr.a(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:function(e){return t._keybindingFor(e)},onHide:function(e){t._contextMenuIsBeingShownCount--,t._editor.focus(),t._editor.updateOptions({hover:r})}})}}},{key:"_keybindingFor",value:function(e){return this._keybindingService.lookupKeybinding(e.id)}},{key:"dispose",value:function(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();yr.ID="editor.contrib.contextmenu",yr=_r([br(1,Wt.a),br(2,Wt.b),br(3,te.b),br(4,Gt.a),br(5,Ie.a)],yr);var Sr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.showContextMenu",label:Z.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:1092,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){yr.get(t).showContextMenu()}}]),n}(Q.b);Object(Q.m)(yr.ID,yr),Object(Q.k)(Sr);var Cr=function(){function e(t){Object(Y.a)(this,e),this.selections=t}return Object($.a)(e,[{key:"equals",value:function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n0&&r._undoStack[r._undoStack.length-1].cursorState.equals(n)||(r._undoStack.push(new kr(n,e.getScrollTop(),e.getScrollLeft())),r._redoStack=[],r._undoStack.length>50&&r._undoStack.shift())}}))),r}return Object($.a)(n,[{key:"cursorUndo",value:function(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new kr(new Cr(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}},{key:"cursorRedo",value:function(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new kr(new Cr(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}},{key:"_applyState",value:function(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);Er.ID="editor.contrib.cursorUndoRedoController";var wr=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"cursorUndo",label:Z.a("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2099,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){Er.get(t).cursorUndo()}}]),n}(Q.b),Or=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"cursorRedo",label:Z.a("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t,n){Er.get(t).cursorRedo()}}]),n}(Q.b);Object(Q.m)(Er.ID,Er),Object(Q.k)(wr),Object(Q.k)(Or);n(490);var Tr=function(){function e(t,n,r){Object(Y.a)(this,e),this.selection=t,this.targetPosition=n,this.copy=r,this.targetSelection=null}return Object($.a)(e,[{key:"getEditOperations",value:function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new Te.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new J.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new J.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber=0?t+1:1}},{key:"getCurrentMatchesPosition",value:function(t){var n,r=this._editor.getModel().getDecorationsInRange(t),i=Object(Ce.a)(r);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.options;if(a===e._FIND_MATCH_DECORATION||a===e._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(o.id)}}catch(s){i.e(s)}finally{i.f()}return 0}},{key:"setCurrentFindMatch",value:function(t){var n=this,r=null,i=0;if(t)for(var o=0,a=this._decorations.length;o1e3){o=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var s=r._editor.getModel().getLineCount(),l=r._editor.getLayoutInfo().height/s,c=Math.max(2,Math.ceil(3/l)),u=t[0].range.startLineNumber,d=t[0].range.endLineNumber,h=1,f=t.length;h=p.startLineNumber?p.endLineNumber>d&&(d=p.endLineNumber):(a.push({range:new Te.a(u,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=p.startLineNumber,d=p.endLineNumber)}a.push({range:new Te.a(u,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}for(var g=new Array(t.length),m=0,v=t.length;m=0;t--){var n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(r&&!(r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}},{key:"matchAfterPosition",value:function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){for(var n=[],r=0;r0?t[0].toUpperCase()+t.substr(1):t}return t}function Rr(e,t,n){return-1!==e[0].indexOf(n)&&-1!==t.indexOf(n)&&e[0].split(n).length===t.split(n).length}function Mr(e,t,n){var r=t.split(n),i=e[0].split(n),o="";return r.forEach((function(e,t){o+=Ir([i[t]],e)+n})),o.slice(0,-1)}var Pr=function e(t){Object(Y.a)(this,e),this.staticValue=t,this.kind=0},jr=function e(t){Object(Y.a)(this,e),this.pieces=t,this.kind=1},Fr=function(){function e(t){Object(Y.a)(this,e),t&&0!==t.length?1===t.length&&null!==t[0].staticValue?this._state=new Pr(t[0].staticValue):this._state=new jr(t):this._state=new Pr("")}return Object($.a)(e,[{key:"buildReplaceString",value:function(t,n){if(0===this._state.kind)return n?Ir(t,this._state.staticValue):this._state.staticValue;for(var r="",i=0,o=this._state.pieces.length;i0){for(var l=[],c=a.caseOps.length,u=0,d=0,h=s.length;d=c){l.push(s.slice(d));break}switch(a.caseOps[u]){case"U":l.push(s[d].toUpperCase());break;case"u":l.push(s[d].toUpperCase()),u++;break;case"L":l.push(s[d].toLowerCase());break;case"l":l.push(s[d].toLowerCase()),u++;break;default:l.push(s[d])}}s=l.join("")}r+=s}else r+=a.staticValue}return r}},{key:"hasReplacementPatterns",get:function(){return 1===this._state.kind}}],[{key:"fromStaticValue",value:function(t){return new e([Br.staticValue(t)])}},{key:"_substitute",value:function(e,t){if(null===t)return"";if(0===e)return t[0];for(var n="";e>0;){if(e0){var s=Object(ne.h)(i.map((function(e){return e.range})),(function(e){return Te.a.compareRangesUsingStarts(e,o)>=0}));a=s>0?s-1+1:a}this._state.changeMatchInfo(a,this._decorations.getCount(),void 0),e&&this._editor.getOption(29).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}},{key:"_hasMatches",value:function(){return this._state.matchesCount>0}},{key:"_cannotFind",value:function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}},{key:"_setCurrentFindMatch",value:function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}},{key:"_prevSearchPosition",value:function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,r=e.column,i=this._editor.getModel();return t||1===r?(1===n?n=i.getLineCount():n--,r=i.getLineMaxColumn(n)):r--,new Oe.a(n,r)}},{key:"_moveToPrevMatch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._state.canNavigateBack()){if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,r=e.column,i=this._editor.getModel();return t||r===i.getLineMaxColumn(n)?(n===i.getLineCount()?n=1:n++,r=1):r++,new Oe.a(n,r)}},{key:"_moveToNextMatch",value:function(e){if(this._state.canNavigateForward()){if(this._decorations.getCount()3&&void 0!==arguments[3]&&arguments[3];if(this._cannotFind())return null;var o=this._decorations.getFindScope(),a=e._getSearchRange(this._editor.getModel(),o);a.getEndPosition().isBefore(t)&&(t=a.getStartPosition()),t.isBefore(a.getStartPosition())&&(t=a.getStartPosition());var s=t,l=s.lineNumber,c=s.column,u=this._editor.getModel(),d=new Oe.a(l,c),h=u.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null,n);return r&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),h=u.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null,n)),h?i||a.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),n,r,!0):null}},{key:"moveToNextMatch",value:function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}},{key:"_getReplacePattern",value:function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new Fr(null);for(var t=[],n=new Ur(e),r=0,i=e.length;r=i)break;var a=e.charCodeAt(r);if(36===a){n.emitUnchanged(r-1),n.emitStatic("$",r+1);continue}if(48===a||38===a){n.emitUnchanged(r-1),n.emitMatchIndex(0,r+1,t),t.length=0;continue}if(49<=a&&a<=57){var s=a-48;if(r+1=i)break;var c=e.charCodeAt(r);switch(c){case 92:n.emitUnchanged(r-1),n.emitStatic("\\",r+1);break;case 110:n.emitUnchanged(r-1),n.emitStatic("\n",r+1);break;case 116:n.emitUnchanged(r-1),n.emitStatic("\t",r+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(r-1),n.emitStatic("",r+1),t.push(String.fromCharCode(c))}}}return n.finalize()}(this._state.replaceString):Fr.fromStaticValue(this._state.replaceString)}},{key:"replace",value:function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){var r=e.buildReplaceString(n.matches,this._state.preserveCase),i=new Ve.a(t,r);this._executeEditorCommand("replace",i),this._decorations.setStartPosition(new Oe.a(t.startLineNumber,t.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}}},{key:"_findMatches",value:function(t,n,r){var i=this,o=(t||[null]).map((function(t){return e._getSearchRange(i._editor.getModel(),t)}));return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null,n,r)}},{key:"replaceAll",value:function(){if(this._hasMatches()){var e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=ci?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}}},{key:"_largeReplaceAll",value:function(){var e=new Dr.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(105):null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="mu";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var r,i=this._editor.getModel(),o=i.getValue(1),a=i.getFullModelRange(),s=this._getReplacePattern(),l=this._state.preserveCase;r=s.hasReplacementPatterns||l?o.replace(t,(function(){return s.buildReplaceString(arguments,l)})):o.replace(t,s.buildReplaceString(null,l));var c=new Ve.b(a,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}}},{key:"_regularReplaceAll",value:function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[],i=0,o=n.length;it&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,i=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,i=!0),"undefined"!==typeof n&&(Te.a.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(r)}},{key:"change",value:function(e,t){var n,r=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},a=!1,s=this.isRegex,l=this.wholeWord,c=this.matchCase,u=this.preserveCase;"undefined"!==typeof e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,a=!0),"undefined"!==typeof e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,a=!0),"undefined"!==typeof e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,a=!0),"undefined"!==typeof e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,a=!0),"undefined"!==typeof e.isRegex&&(this._isRegex=e.isRegex),"undefined"!==typeof e.wholeWord&&(this._wholeWord=e.wholeWord),"undefined"!==typeof e.matchCase&&(this._matchCase=e.matchCase),"undefined"!==typeof e.preserveCase&&(this._preserveCase=e.preserveCase),"undefined"!==typeof e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((function(e){var t;return null===(t=r._searchScope)||void 0===t?void 0:t.some((function(t){return!Te.a.equalsRange(t,e)}))})))||(this._searchScope=e.searchScope,o.searchScope=!0,a=!0)),"undefined"!==typeof e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,a=!0),this._isRegexOverride="undefined"!==typeof e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride="undefined"!==typeof e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride="undefined"!==typeof e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride="undefined"!==typeof e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(a=!0,o.isRegex=!0),l!==this.wholeWord&&(a=!0,o.wholeWord=!0),c!==this.matchCase&&(a=!0,o.matchCase=!0),u!==this.preserveCase&&(a=!0,o.preserveCase=!0),a&&this._onFindReplaceStateChange.fire(o)}},{key:"canNavigateBack",value:function(){return this.canNavigateInLoop()||1!==this.matchesPosition}},{key:"canNavigateForward",value:function(){return this.canNavigateInLoop()||this.matchesPosition=ci}},{key:"searchString",get:function(){return this._searchString}},{key:"replaceString",get:function(){return this._replaceString}},{key:"isRevealed",get:function(){return this._isRevealed}},{key:"isReplaceRevealed",get:function(){return this._isReplaceRevealed}},{key:"isRegex",get:function(){return Si(this._isRegexOverride,this._isRegex)}},{key:"wholeWord",get:function(){return Si(this._wholeWordOverride,this._wholeWord)}},{key:"matchCase",get:function(){return Si(this._matchCaseOverride,this._matchCase)}},{key:"preserveCase",get:function(){return Si(this._preserveCaseOverride,this._preserveCase)}},{key:"actualIsRegex",get:function(){return this._isRegex}},{key:"actualWholeWord",get:function(){return this._wholeWord}},{key:"actualMatchCase",get:function(){return this._matchCase}},{key:"actualPreserveCase",get:function(){return this._preserveCase}},{key:"searchScope",get:function(){return this._searchScope}},{key:"matchesPosition",get:function(){return this._matchesPosition}},{key:"matchesCount",get:function(){return this._matchesCount}},{key:"currentMatch",get:function(){return this._currentMatch}}]),n}(we.a),ki=(n(492),n(175)),Ei=(n(315),n(214)),wi=Z.a("defaultLabel","input"),Oi=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;Object(Y.a)(this,n),(a=t.call(this))._showOptionButtons=i,a.fixFocusOnOptionClickEnabled=!0,a._onDidOptionChange=a._register(new en.a),a.onDidOptionChange=a._onDidOptionChange.event,a._onKeyDown=a._register(new en.a),a.onKeyDown=a._onKeyDown.event,a._onMouseDown=a._register(new en.a),a.onMouseDown=a._onMouseDown.event,a._onInput=a._register(new en.a),a._onKeyUp=a._register(new en.a),a._onCaseSensitiveKeyDown=a._register(new en.a),a.onCaseSensitiveKeyDown=a._onCaseSensitiveKeyDown.event,a._onRegexKeyDown=a._register(new en.a),a.onRegexKeyDown=a._onRegexKeyDown.event,a._lastHighlightFindOptions=0,a.contextViewProvider=r,a.placeholder=o.placeholder||"",a.validation=o.validation,a.label=o.label||wi,a.inputActiveOptionBorder=o.inputActiveOptionBorder,a.inputActiveOptionForeground=o.inputActiveOptionForeground,a.inputActiveOptionBackground=o.inputActiveOptionBackground,a.inputBackground=o.inputBackground,a.inputForeground=o.inputForeground,a.inputBorder=o.inputBorder,a.inputValidationInfoBorder=o.inputValidationInfoBorder,a.inputValidationInfoBackground=o.inputValidationInfoBackground,a.inputValidationInfoForeground=o.inputValidationInfoForeground,a.inputValidationWarningBorder=o.inputValidationWarningBorder,a.inputValidationWarningBackground=o.inputValidationWarningBackground,a.inputValidationWarningForeground=o.inputValidationWarningForeground,a.inputValidationErrorBorder=o.inputValidationErrorBorder,a.inputValidationErrorBackground=o.inputValidationErrorBackground,a.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.appendCaseSensitiveLabel||"",l=o.appendWholeWordsLabel||"",c=o.appendRegexLabel||"",u=o.history||[],d=!!o.flexibleHeight,h=!!o.flexibleWidth,f=o.flexibleMaxHeight;a.domNode=document.createElement("div"),zt.addClass(a.domNode,"monaco-findInput"),a.inputBox=a._register(new Ei.a(a.domNode,a.contextViewProvider,{placeholder:a.placeholder||"",ariaLabel:a.label||"",validationOptions:{validation:a.validation},inputBackground:a.inputBackground,inputForeground:a.inputForeground,inputBorder:a.inputBorder,inputValidationInfoBackground:a.inputValidationInfoBackground,inputValidationInfoForeground:a.inputValidationInfoForeground,inputValidationInfoBorder:a.inputValidationInfoBorder,inputValidationWarningBackground:a.inputValidationWarningBackground,inputValidationWarningForeground:a.inputValidationWarningForeground,inputValidationWarningBorder:a.inputValidationWarningBorder,inputValidationErrorBackground:a.inputValidationErrorBackground,inputValidationErrorForeground:a.inputValidationErrorForeground,inputValidationErrorBorder:a.inputValidationErrorBorder,history:u,flexibleHeight:d,flexibleWidth:h,flexibleMaxHeight:f})),a.regex=a._register(new bi({appendTitle:c,isChecked:!1,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})),a._register(a.regex.onChange((function(e){a._onDidOptionChange.fire(e),!e&&a.fixFocusOnOptionClickEnabled&&a.inputBox.focus(),a.validate()}))),a._register(a.regex.onKeyDown((function(e){a._onRegexKeyDown.fire(e)}))),a.wholeWords=a._register(new _i({appendTitle:l,isChecked:!1,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})),a._register(a.wholeWords.onChange((function(e){a._onDidOptionChange.fire(e),!e&&a.fixFocusOnOptionClickEnabled&&a.inputBox.focus(),a.validate()}))),a.caseSensitive=a._register(new vi({appendTitle:s,isChecked:!1,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})),a._register(a.caseSensitive.onChange((function(e){a._onDidOptionChange.fire(e),!e&&a.fixFocusOnOptionClickEnabled&&a.inputBox.focus(),a.validate()}))),a._register(a.caseSensitive.onKeyDown((function(e){a._onCaseSensitiveKeyDown.fire(e)}))),a._showOptionButtons&&(a.inputBox.paddingRight=a.caseSensitive.width()+a.wholeWords.width()+a.regex.width());var p=[a.caseSensitive.domNode,a.wholeWords.domNode,a.regex.domNode];a.onkeydown(a.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=p.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%p.length:e.equals(15)&&(n=0===t?p.length-1:t-1),e.equals(9)?p[t].blur():n>=0&&p[n].focus(),zt.EventHelper.stop(e,!0)}}}));var g=document.createElement("div");return g.className="controls",g.style.display=a._showOptionButtons?"block":"none",g.appendChild(a.caseSensitive.domNode),g.appendChild(a.wholeWords.domNode),g.appendChild(a.regex.domNode),a.domNode.appendChild(g),e&&e.appendChild(a.domNode),a.onkeydown(a.inputBox.inputElement,(function(e){return a._onKeyDown.fire(e)})),a.onkeyup(a.inputBox.inputElement,(function(e){return a._onKeyUp.fire(e)})),a.oninput(a.inputBox.inputElement,(function(e){return a._onInput.fire()})),a.onmousedown(a.inputBox.inputElement,(function(e){return a._onMouseDown.fire(e)})),a}return Object($.a)(n,[{key:"enable",value:function(){zt.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}},{key:"disable",value:function(){zt.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}},{key:"setFocusInputOnOptionClick",value:function(e){this.fixFocusOnOptionClickEnabled=e}},{key:"setEnabled",value:function(e){e?this.enable():this.disable()}},{key:"getValue",value:function(){return this.inputBox.value}},{key:"setValue",value:function(e){this.inputBox.value!==e&&(this.inputBox.value=e)}},{key:"style",value:function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,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()}},{key:"applyStyles",value:function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}},{key:"select",value:function(){this.inputBox.select()}},{key:"focus",value:function(){this.inputBox.focus()}},{key:"getCaseSensitive",value:function(){return this.caseSensitive.checked}},{key:"setCaseSensitive",value:function(e){this.caseSensitive.checked=e}},{key:"getWholeWords",value:function(){return this.wholeWords.checked}},{key:"setWholeWords",value:function(e){this.wholeWords.checked=e}},{key:"getRegex",value:function(){return this.regex.checked}},{key:"setRegex",value:function(e){this.regex.checked=e,this.validate()}},{key:"focusOnCaseSensitive",value:function(){this.caseSensitive.focus()}},{key:"highlightFindOptions",value:function(){zt.removeClass(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,zt.addClass(this.domNode,"highlight-"+this._lastHighlightFindOptions)}},{key:"validate",value:function(){this.inputBox.validate()}},{key:"clearMessage",value:function(){this.inputBox.hideMessage()}}]),n}(di.a),Ti=n(96),xi=Z.a("defaultLabel","input"),Ni=Z.a("label.preserveCaseCheckbox","Preserve Case"),Di=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){return Object(Y.a)(this,n),t.call(this,{icon:re.a.preserveCase,title:Ni+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}return n}(fi),Li=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;Object(Y.a)(this,n),(a=t.call(this))._showOptionButtons=i,a.fixFocusOnOptionClickEnabled=!0,a.cachedOptionsWidth=0,a._onDidOptionChange=a._register(new en.a),a.onDidOptionChange=a._onDidOptionChange.event,a._onKeyDown=a._register(new en.a),a.onKeyDown=a._onKeyDown.event,a._onMouseDown=a._register(new en.a),a._onInput=a._register(new en.a),a._onKeyUp=a._register(new en.a),a._onPreserveCaseKeyDown=a._register(new en.a),a.onPreserveCaseKeyDown=a._onPreserveCaseKeyDown.event,a.contextViewProvider=r,a.placeholder=o.placeholder||"",a.validation=o.validation,a.label=o.label||xi,a.inputActiveOptionBorder=o.inputActiveOptionBorder,a.inputActiveOptionForeground=o.inputActiveOptionForeground,a.inputActiveOptionBackground=o.inputActiveOptionBackground,a.inputBackground=o.inputBackground,a.inputForeground=o.inputForeground,a.inputBorder=o.inputBorder,a.inputValidationInfoBorder=o.inputValidationInfoBorder,a.inputValidationInfoBackground=o.inputValidationInfoBackground,a.inputValidationInfoForeground=o.inputValidationInfoForeground,a.inputValidationWarningBorder=o.inputValidationWarningBorder,a.inputValidationWarningBackground=o.inputValidationWarningBackground,a.inputValidationWarningForeground=o.inputValidationWarningForeground,a.inputValidationErrorBorder=o.inputValidationErrorBorder,a.inputValidationErrorBackground=o.inputValidationErrorBackground,a.inputValidationErrorForeground=o.inputValidationErrorForeground;var s=o.history||[],l=!!o.flexibleHeight,c=!!o.flexibleWidth,u=o.flexibleMaxHeight;a.domNode=document.createElement("div"),zt.addClass(a.domNode,"monaco-findInput"),a.inputBox=a._register(new Ei.a(a.domNode,a.contextViewProvider,{ariaLabel:a.label||"",placeholder:a.placeholder||"",validationOptions:{validation:a.validation},inputBackground:a.inputBackground,inputForeground:a.inputForeground,inputBorder:a.inputBorder,inputValidationInfoBackground:a.inputValidationInfoBackground,inputValidationInfoForeground:a.inputValidationInfoForeground,inputValidationInfoBorder:a.inputValidationInfoBorder,inputValidationWarningBackground:a.inputValidationWarningBackground,inputValidationWarningForeground:a.inputValidationWarningForeground,inputValidationWarningBorder:a.inputValidationWarningBorder,inputValidationErrorBackground:a.inputValidationErrorBackground,inputValidationErrorForeground:a.inputValidationErrorForeground,inputValidationErrorBorder:a.inputValidationErrorBorder,history:s,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u})),a.preserveCase=a._register(new Di({appendTitle:"",isChecked:!1,inputActiveOptionBorder:a.inputActiveOptionBorder,inputActiveOptionForeground:a.inputActiveOptionForeground,inputActiveOptionBackground:a.inputActiveOptionBackground})),a._register(a.preserveCase.onChange((function(e){a._onDidOptionChange.fire(e),!e&&a.fixFocusOnOptionClickEnabled&&a.inputBox.focus(),a.validate()}))),a._register(a.preserveCase.onKeyDown((function(e){a._onPreserveCaseKeyDown.fire(e)}))),a._showOptionButtons?a.cachedOptionsWidth=a.preserveCase.width():a.cachedOptionsWidth=0;var d=[a.preserveCase.domNode];a.onkeydown(a.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=d.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%d.length:e.equals(15)&&(n=0===t?d.length-1:t-1),e.equals(9)?d[t].blur():n>=0&&d[n].focus(),zt.EventHelper.stop(e,!0)}}}));var h=document.createElement("div");return h.className="controls",h.style.display=a._showOptionButtons?"block":"none",h.appendChild(a.preserveCase.domNode),a.domNode.appendChild(h),e&&e.appendChild(a.domNode),a.onkeydown(a.inputBox.inputElement,(function(e){return a._onKeyDown.fire(e)})),a.onkeyup(a.inputBox.inputElement,(function(e){return a._onKeyUp.fire(e)})),a.oninput(a.inputBox.inputElement,(function(e){return a._onInput.fire()})),a.onmousedown(a.inputBox.inputElement,(function(e){return a._onMouseDown.fire(e)})),a}return Object($.a)(n,[{key:"enable",value:function(){zt.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.preserveCase.enable()}},{key:"disable",value:function(){zt.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.preserveCase.disable()}},{key:"setEnabled",value:function(e){e?this.enable():this.disable()}},{key:"style",value:function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,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()}},{key:"applyStyles",value:function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}},{key:"select",value:function(){this.inputBox.select()}},{key:"focus",value:function(){this.inputBox.focus()}},{key:"getPreserveCase",value:function(){return this.preserveCase.checked}},{key:"setPreserveCase",value:function(e){this.preserveCase.checked=e}},{key:"focusOnPreserve",value:function(){this.preserveCase.focus()}},{key:"validate",value:function(){this.inputBox&&this.inputBox.validate()}},{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"width",set:function(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}}]),n}(di.a),Ai=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ii=function(e,t){return function(n,r){t(n,r,e)}},Ri="historyNavigationWidget",Mi="historyNavigationEnabled";function Pi(e,t){return e.getContext(document.activeElement).getValue(t)}function ji(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new te.c(n,t).bindTo(e)}(n,t,Ri),{scopedContextKeyService:n,historyNavigationEnablement:new te.c(Mi,!0).bindTo(n)}}var Fi=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Object(Y.a)(this,n),(a=t.call(this,e,r,s,i))._register(ji(o,{target:a.inputBox.element,historyNavigator:a.inputBox}).scopedContextKeyService),a}return n}(Oi);Fi=Ai([Ii(3,te.b)],Fi);var Bi=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Object(Y.a)(this,n),(a=t.call(this,e,r,s,i))._register(ji(o,{target:a.inputBox.element,historyNavigator:a.inputBox}).scopedContextKeyService),a}return n}(Li);Bi=Ai([Ii(3,te.b)],Bi),Ti.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:te.a.and(te.a.has(Ri),te.a.equals(Mi,!0)),primary:16,secondary:[528],handler:function(e,t){var n=Pi(e.get(te.b),Ri);n&&n.historyNavigator.showPreviousValue()}}),Ti.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:te.a.and(te.a.has(Ri),te.a.equals(Mi,!0)),primary:18,secondary:[530],handler:function(e,t){var n=Pi(e.get(te.b),Ri);n&&n.historyNavigator.showNextValue()}});var Ui=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Hi=Object(re.e)("find-selection",re.a.selection),zi=Object(re.e)("find-collapsed",re.a.chevronRight),Vi=Object(re.e)("find-expanded",re.a.chevronDown),Wi=Object(re.e)("find-close",re.a.close),Gi=Object(re.e)("find-replace",re.a.replace),qi=Object(re.e)("find-replace-all",re.a.replaceAll),Ki=Object(re.e)("find-previous-match",re.a.arrowUp),Yi=Object(re.e)("find-next-match",re.a.arrowDown),$i=Z.a("label.find","Find"),Qi=Z.a("placeholder.find","Find"),Zi=Z.a("label.previousMatchButton","Previous match"),Xi=Z.a("label.nextMatchButton","Next match"),Ji=Z.a("label.toggleSelectionFind","Find in selection"),eo=Z.a("label.closeButton","Close"),to=Z.a("label.replace","Replace"),no=Z.a("placeholder.replace","Replace"),ro=Z.a("label.replaceButton","Replace"),io=Z.a("label.replaceAllButton","Replace All"),oo=Z.a("label.toggleReplaceButton","Toggle Replace mode"),ao=Z.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",ci),so=Z.a("label.matchesLocation","{0} of {1}"),lo=Z.a("label.noResults","No results"),co=419,uo=69,ho="ctrlEnterReplaceAll.windows.donotask",fo=Ke.f?256:2048,po=function e(t){Object(Y.a)(this,e),this.afterLineNumber=t,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"};function go(e,t,n){var r=!!t.match(/\n/);n&&r&&n.selectionStart>0&&e.stopPropagation()}function mo(e,t,n){var r=!!t.match(/\n/);n&&r&&n.selectionEnd0&&0===this._state.matchesCount;zt.toggleClass(this._domNode,"no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}},{key:"_delayedUpdateHistory",value:function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))}},{key:"_updateHistory",value:function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}},{key:"_updateMatchesCount",value:function(){var e;if(this._matchesCount.style.minWidth=uo+"px",this._state.matchesCount>=ci?this._matchesCount.title=ao:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=ci&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=ht.x(so,n,t)}else e=lo;this._matchesCount.appendChild(document.createTextNode(e)),Object(he.a)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),uo=Math.max(uo,this._matchesCount.clientWidth)}},{key:"_getAriaLabel",value:function(e,t,n){if(e===lo)return""===n?Z.a("ariaSearchNoResultEmpty","{0} found",e):Z.a("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){var r=Z.a("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),i=this._codeEditor.getModel();if(i&&t.startLineNumber<=i.getLineCount()&&t.startLineNumber>=1){var o=i.getLineContent(t.startLineNumber);return"".concat(o,", ").concat(r)}return r}return Z.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}},{key:"_updateToggleSelectionFindButton",value:function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}},{key:"_updateButtons",value:function(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),zt.toggleClass(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var n=!this._codeEditor.getOption(72);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}},{key:"_reveal",value:function(){var e=this;if(!this._isVisible){this._isVisible=!0;var t=this._codeEditor.getSelection();switch(this._codeEditor.getOption(29).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":var n=!!t&&t.startLineNumber!==t.endLineNumber;this._toggleSelectionFind.checked=n}this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){zt.addClass(e._domNode,"visible"),e._domNode.setAttribute("aria-hidden","false")}),0),setTimeout((function(){e._findInput.validate()}),200),this._codeEditor.layoutOverlayWidget(this);var r=!0;if(this._codeEditor.getOption(29).seedSearchStringFromSelection&&t){var i=this._codeEditor.getDomNode();if(i){var o=zt.getDomNodePagePosition(i),a=this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),s=o.left+(a?a.left:0),l=a?a.top:0;if(this._viewZone&&lt.startLineNumber&&(r=!1);var c=zt.getTopLeftOffset(this._domNode).left;s>c&&(r=!1);var u=this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());o.left+(u?u.left:0)>c&&(r=!1)}}}this._showViewZone(r)}}},{key:"_hide",value:function(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),zt.removeClass(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}},{key:"_layoutViewZone",value:function(){var e=this;if(this._codeEditor.getOption(29).addExtraSpaceOnTop){if(this._isVisible){var t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((function(n){t.heightInPx=e._getHeight(),e._viewZoneId=n.addZone(t),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+t.heightInPx)}))}}else this._removeViewZone()}},{key:"_showViewZone",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._isVisible){var n=this._codeEditor.getOption(29).addExtraSpaceOnTop;if(n){void 0===this._viewZone&&(this._viewZone=new po(0));var r=this._viewZone;this._codeEditor.changeViewZones((function(n){if(void 0!==e._viewZoneId){var i=e._getHeight();if(i===r.heightInPx)return;var o=i-r.heightInPx;return r.heightInPx=i,n.layoutZone(e._viewZoneId),void(t&&e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+o))}var a=e._getHeight();(a-=e._codeEditor.getOption(66).top)<=0||(r.heightInPx=a,e._viewZoneId=n.addZone(r),t&&e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+a))}))}}}},{key:"_removeViewZone",value:function(){var e=this;this._codeEditor.changeViewZones((function(t){void 0!==e._viewZoneId&&(t.removeZone(e._viewZoneId),e._viewZoneId=void 0,e._viewZone&&(e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()-e._viewZone.heightInPx),e._viewZone=void 0))}))}},{key:"_applyTheme",value:function(e){var t={inputActiveOptionBorder:e.getColor(Le.db),inputActiveOptionBackground:e.getColor(Le.cb),inputActiveOptionForeground:e.getColor(Le.eb),inputBackground:e.getColor(Le.fb),inputForeground:e.getColor(Le.hb),inputBorder:e.getColor(Le.gb),inputValidationInfoBackground:e.getColor(Le.lb),inputValidationInfoForeground:e.getColor(Le.nb),inputValidationInfoBorder:e.getColor(Le.mb),inputValidationWarningBackground:e.getColor(Le.ob),inputValidationWarningForeground:e.getColor(Le.qb),inputValidationWarningBorder:e.getColor(Le.pb),inputValidationErrorBackground:e.getColor(Le.ib),inputValidationErrorForeground:e.getColor(Le.kb),inputValidationErrorBorder:e.getColor(Le.jb)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}},{key:"_tryUpdateWidgetWidth",value:function(){if(this._isVisible&&zt.isInDOM(this._domNode)){var e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)zt.addClass(this._domNode,"hiddenEditor");else{zt.hasClass(this._domNode,"hiddenEditor")&&zt.removeClass(this._domNode,"hiddenEditor");var t=e.width,n=e.minimap.minimapWidth,r=!1,i=!1,o=!1;if(this._resized)if(zt.getTotalWidth(this._domNode)>co)return this._domNode.style.maxWidth="".concat(t-28-n-15,"px"),void(this._replaceInput.width=zt.getTotalWidth(this._findInput.domNode));if(447+n>=t&&(i=!0),447+n-uo>=t&&(o=!0),447+n-uo>=t+50&&(r=!0),zt.toggleClass(this._domNode,"collapsed-find-widget",r),zt.toggleClass(this._domNode,"narrow-find-widget",o),zt.toggleClass(this._domNode,"reduced-find-widget",i),o||r||(this._domNode.style.maxWidth="".concat(t-28-n-15,"px")),this._resized){this._findInput.inputBox.layout();var a=this._findInput.inputBox.element.clientWidth;a>0&&(this._replaceInput.width=a)}else this._isReplaceVisible&&(this._replaceInput.width=zt.getTotalWidth(this._findInput.domNode))}}}},{key:"_getHeight",value:function(){var e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4}},{key:"_tryUpdateHeight",value:function(){var e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height="".concat(e,"px"),!0)}},{key:"focusFindInput",value:function(){this._findInput.select(),this._findInput.focus()}},{key:"focusReplaceInput",value:function(){this._replaceInput.select(),this._replaceInput.focus()}},{key:"highlightFindOptions",value:function(){this._findInput.highlightFindOptions()}},{key:"_updateSearchScope",value:function(){var e=this;if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){var t=this._codeEditor.getSelections();t.map((function(t){1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));var n=e._state.currentMatch;return t.startLineNumber===t.endLineNumber||Te.a.equalsRange(t,n)?null:t})).filter((function(e){return!!e})),t.length&&this._state.change({searchScope:t},!0)}}},{key:"_onFindInputMouseDown",value:function(e){e.middleButton&&e.stopPropagation()}},{key:"_onFindInputKeyDown",value:function(e){return e.equals(3|fo)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?go(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?mo(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}},{key:"_onReplaceInputKeyDown",value:function(e){return e.equals(3|fo)?(Ke.i&&Ke.g&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(Z.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ho,!0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?go(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?mo(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}},{key:"getVerticalSashLeft",value:function(e){return 0}},{key:"_keybindingLabelFor",value:function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" (".concat(t.getLabel(),")"):""}},{key:"_buildDomNode",value:function(){var e=this;this._findInput=this._register(new Fi(null,this._contextViewProvider,{width:221,label:$i,placeholder:Qi,appendCaseSensitiveLabel:this._keybindingLabelFor(ni),appendWholeWordsLabel:this._keybindingLabelFor(ri),appendRegexLabel:this._keybindingLabelFor(ii),validation:function(t){if(0===t.length||!e._findInput.getRegex())return null;try{return new RegExp(t,"gu"),null}catch(n){return{content:n.message}}},flexibleHeight:true,flexibleWidth:true,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._ignoreChangeEvent||e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInput.focus(),t.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceInput.focusOnPreserve(),t.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((function(t){e._tryUpdateHeight()&&e._showViewZone()}))),Ke.d&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new _o({label:Zi+this._keybindingLabelFor(Zr),className:Ki.classNames,onTrigger:function(){e._codeEditor.getAction(Zr).run().then(void 0,ie.e)}})),this._nextBtn=this._register(new _o({label:Xi+this._keybindingLabelFor(Qr),className:Yi.classNames,onTrigger:function(){e._codeEditor.getAction(Qr).run().then(void 0,ie.e)}}));var t=document.createElement("div");t.className="find-part",t.appendChild(this._findInput.domNode);var n=document.createElement("div");n.className="find-actions",t.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new fi({icon:Hi,title:Ji+this._keybindingLabelFor(oi),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((function(){if(e._toggleSelectionFind.checked){if(e._codeEditor.hasModel()){var t=e._codeEditor.getSelections();t.map((function(t){return 1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t})).filter((function(e){return!!e})),t.length&&e._state.change({searchScope:t},!0)}}else e._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new _o({label:eo+this._keybindingLabelFor(ti),className:Wi.classNames,onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Bi(null,void 0,{label:to,placeholder:no,history:[],flexibleHeight:true,flexibleWidth:true,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((function(t){return e._onReplaceInputKeyDown(t)}))),this._register(this._replaceInput.inputBox.onDidChange((function(){e._state.change({replaceString:e._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((function(t){e._isReplaceVisible&&e._tryUpdateHeight()&&e._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((function(){e._state.change({preserveCase:e._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((function(t){t.equals(2)&&(e._prevBtn.isEnabled()?e._prevBtn.focus():e._nextBtn.isEnabled()?e._nextBtn.focus():e._toggleSelectionFind.enabled?e._toggleSelectionFind.focus():e._closeBtn.isEnabled()&&e._closeBtn.focus(),t.preventDefault())}))),this._replaceBtn=this._register(new _o({label:ro+this._keybindingLabelFor(ai),className:Gi.classNames,onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new _o({label:io+this._keybindingLabelFor(si),className:qi.classNames,onTrigger:function(){e._controller.replaceAll()}}));var r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);var i=document.createElement("div");i.className="replace-actions",r.appendChild(i),i.appendChild(this._replaceBtn.domNode),i.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new _o({label:oo,className:"codicon toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInput.width=zt.getTotalWidth(e._findInput.domNode),e._replaceInput.inputBox.layout()),e._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="".concat(co,"px"),this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(r),this._resizeSash=new ki.a(this._domNode,this,{orientation:0,size:2}),this._resized=!1;var o=co;this._register(this._resizeSash.onDidStart((function(){o=zt.getTotalWidth(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(t){e._resized=!0;var n=o+t.startX-t.currentX;n(parseFloat(zt.getComputedStyle(e._domNode).maxWidth)||0)||(e._domNode.style.width="".concat(n,"px"),e._isReplaceVisible&&(e._replaceInput.width=zt.getTotalWidth(e._findInput.domNode)),e._findInput.inputBox.layout(),e._tryUpdateHeight()))}))),this._register(this._resizeSash.onDidReset((function(){var t=zt.getTotalWidth(e._domNode);if(!(t=0}},{key:"focus",value:function(){this._domNode.focus()}},{key:"setEnabled",value:function(e){zt.toggleClass(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}},{key:"setExpanded",value:function(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(zt.removeClasses(this._domNode,zi.classNames),zt.addClasses(this._domNode,Vi.classNames)):(zt.removeClasses(this._domNode,Vi.classNames),zt.addClasses(this._domNode,zi.classNames))}},{key:"domNode",get:function(){return this._domNode}}]),n}(di.a);Object(Ae.g)((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor ".concat(e," { background-color: ").concat(n,"; }"))};n(".findMatch",e.getColor(Le.x)),n(".currentFindMatch",e.getColor(Le.v)),n(".findScope",e.getColor(Le.z)),n(".find-widget",e.getColor(Le.U));var r=e.getColor(Le.uc);r&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px ".concat(r,"; }"));var i=e.getColor(Le.y);i&&t.addRule(".monaco-editor .findMatch { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(i,"; box-sizing: border-box; }"));var o=e.getColor(Le.w);o&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid ".concat(o,"; padding: 1px; box-sizing: border-box; }"));var a=e.getColor(Le.A);a&&t.addRule(".monaco-editor .findScope { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(a,"; }"));var s=e.getColor(Le.h);s&&t.addRule(".monaco-editor .find-widget { border: 1px solid ".concat(s,"; }"));var l=e.getColor(Le.W);l&&t.addRule(".monaco-editor .find-widget { color: ".concat(l,"; }"));var c=e.getColor(Le.Y);c&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: ".concat(c,"; }"));var u=e.getColor(Le.X);if(u)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: ".concat(u,"; }"));else{var d=e.getColor(Le.V);d&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: ".concat(d,"; }"))}var h=e.getColor(Le.Z);h&&t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ".concat(h,"; }"))}));var bo=n(196),yo=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},So=function(e,t){return function(n,r){t(n,r,e)}},Co=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function ko(e){if(!e.hasModel())return null;var t=e.getSelection();if(t.startLineNumber===t.endLineNumber)if(t.isEmpty()){var n=e.getConfiguredWordAtPosition(t.getStartPosition());if(n)return n.word}else if(e.getModel().getValueLengthInRange(t)<524288)return e.getModel().getValueInRange(t);return null}var Eo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._findWidgetVisible=Hr.bindTo(r),a._contextKeyService=r,a._storageService=i,a._clipboardService=o,a._updateHistoryDelayer=new Ee.a(500),a._state=a._register(new Ci),a.loadQueryState(),a._register(a._state.onFindReplaceStateChange((function(e){return a._onStateChanged(e)}))),a._model=null,a._register(a._editor.onDidChangeModel((function(){var e=a._editor.getModel()&&a._state.isRevealed;a.disposeModel(),a._state.change({searchScope:null,matchCase:a._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:a._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:a._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:a._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&a._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:a._editor.getOption(29).loop})}))),a}return Object($.a)(n,[{key:"dispose",value:function(){this.disposeModel(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"disposeModel",value:function(){this._model&&(this._model.dispose(),this._model=null)}},{key:"_onStateChanged",value:function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}},{key:"saveQueryState",value:function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1)}},{key:"loadQueryState",value:function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}},{key:"isFindInputFocused",value:function(){return!!zr.getValue(this._contextKeyService)}},{key:"getState",value:function(){return this._state}},{key:"closeFindWidget",value:function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}},{key:"toggleCaseSensitive",value:function(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}},{key:"toggleWholeWords",value:function(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}},{key:"toggleRegex",value:function(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}},{key:"toggleSearchScope",value:function(){var e=this;if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){var t=this._editor.getSelections();t.map((function(t){return 1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t})).filter((function(e){return!!e})),t.length&&this._state.change({searchScope:t},!0)}}},{key:"setSearchString",value:function(e){this._state.isRegex&&(e=ht.v(e)),this._state.change({searchString:e},!1)}},{key:"highlightFindOptions",value:function(){}},{key:"_start",value:function(e){return Co(this,void 0,void 0,G.a.mark((function t(){var n,r,i,o;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.disposeModel(),this._editor.hasModel()){t.next=3;break}return t.abrupt("return");case 3:if(n={isRevealed:!0},e.seedSearchStringFromSelection&&(r=ko(this._editor))&&(this._state.isRegex?n.searchString=ht.v(r):n.searchString=r),n.searchString||!e.seedSearchStringFromGlobalClipboard){t.next=12;break}return t.next=8,this.getGlobalBufferTerm();case 8:if(i=t.sent,this._editor.hasModel()){t.next=11;break}return t.abrupt("return");case 11:i&&(n.searchString=i);case 12:e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope&&(o=this._editor.getSelections()).some((function(e){return!e.isEmpty()}))&&(n.searchScope=o),n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new ui(this._editor,this._state));case 17:case"end":return t.stop()}}),t,this)})))}},{key:"start",value:function(e){return this._start(e)}},{key:"moveToNextMatch",value:function(){return!!this._model&&(this._model.moveToNextMatch(),!0)}},{key:"moveToPrevMatch",value:function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}},{key:"replace",value:function(){return!!this._model&&(this._model.replace(),!0)}},{key:"replaceAll",value:function(){return!!this._model&&(this._model.replaceAll(),!0)}},{key:"selectAllMatches",value:function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}},{key:"getGlobalBufferTerm",value:function(){return Co(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._editor.getOption(29).globalFindClipboard||!this._editor.hasModel()||this._editor.getModel().isTooLargeForSyncing()){e.next=2;break}return e.abrupt("return",this._clipboardService.readFindText());case 2:return e.abrupt("return","");case 3:case"end":return e.stop()}}),e,this)})))}},{key:"setGlobalBufferTerm",value:function(e){this._editor.getOption(29).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);Eo.ID="editor.contrib.findController";var wo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s,l,c,u){var d;return Object(Y.a)(this,n),(d=t.call(this,e,i,l,u))._contextViewService=r,d._keybindingService=o,d._themeService=a,d._notificationService=s,d._storageKeysSyncRegistryService=c,d._widget=null,d._findOptionsWidget=null,d}return Object($.a)(n,[{key:"_start",value:function(e){var t=this,r=Object.create(null,{_start:{get:function(){return Object(Rt.a)(Object(Mt.a)(n.prototype),"_start",t)}}});return Co(this,void 0,void 0,G.a.mark((function t(){var n,i,o;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._widget||this._createFindWidget(),n=this._editor.getSelection(),i=!1,t.t0=this._editor.getOption(29).autoFindInSelection,t.next="always"===t.t0?6:"never"===t.t0?8:"multiline"===t.t0?10:13;break;case 6:return i=!0,t.abrupt("break",14);case 8:return i=!1,t.abrupt("break",14);case 10:return o=!!n&&n.startLineNumber!==n.endLineNumber,i=o,t.abrupt("break",14);case 13:return t.abrupt("break",14);case 14:return e.updateSearchScope=i,t.next=17,r._start.call(this,e);case 17:this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput());case 18:case"end":return t.stop()}}),t,this)})))}},{key:"highlightFindOptions",value:function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}},{key:"_createFindWidget",value:function(){this._widget=this._register(new vo(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._storageKeysSyncRegistryService)),this._findOptionsWidget=this._register(new yi(this._editor,this._state,this._keybindingService,this._themeService))}}]),n}(Eo=yo([So(1,te.b),So(2,Vn.a),So(3,Qe.a)],Eo));wo=yo([So(1,Wt.b),So(2,te.b),So(3,Gt.a),So(4,Ae.c),So(5,fn.a),So(6,Vn.a),So(7,bo.a),So(8,Qe.a)],wo);var Oo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Yr,label:Z.a("startFindAction","Find"),alias:"Find",precondition:void 0,kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ie.b.MenubarEditMenu,group:"3_find",title:Z.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Co(this,void 0,void 0,G.a.mark((function e(){var n;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Eo.get(t))){e.next=4;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(29).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop});case 4:case"end":return e.stop()}}),e)})))}}]),n}(Q.f),To=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:$r,label:Z.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Co(this,void 0,void 0,G.a.mark((function e(){var n;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Eo.get(t))){e.next=5;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop});case 4:n.setGlobalBufferTerm(n.getState().searchString);case 5:case"end":return e.stop()}}),e)})))}}]),n}(Q.b),xo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"run",value:function(e,t){return Co(this,void 0,void 0,G.a.mark((function e(){var n;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Eo.get(t))||this._run(n)){e.next=5;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop});case 4:this._run(n);case 5:case"end":return e.stop()}}),e,this)})))}}]),n}(Q.b),No=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Qr,label:Z.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToNextMatch()}}]),n}(xo),Do=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Qr,label:Z.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.focus,zr),primary:3,weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToNextMatch()}}]),n}(xo),Lo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Zr,label:Z.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(xo),Ao=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Zr,label:Z.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.focus,zr),primary:1027,weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(xo),Io=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"run",value:function(e,t){return Co(this,void 0,void 0,G.a.mark((function e(){var n,r;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Eo.get(t)){e.next=3;break}return e.abrupt("return");case 3:if((r=ko(t))&&n.setSearchString(r),this._run(n)){e.next=9;break}return e.next=8,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(29).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop});case 8:this._run(n);case 9:case"end":return e.stop()}}),e,this)})))}}]),n}(Q.b),Ro=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Xr,label:Z.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:2109,weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToNextMatch()}}]),n}(Io),Mo=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Jr,label:Z.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:3133,weight:100}})}return Object($.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(Io),Po=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:ei,label:Z.a("startReplace","Replace"),alias:"Replace",precondition:void 0,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ie.b.MenubarEditMenu,group:"3_find",title:Z.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})}return Object($.a)(n,[{key:"run",value:function(e,t){return Co(this,void 0,void 0,G.a.mark((function e(){var n,r,i,o,a;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasModel()&&!t.getOption(72)){e.next=2;break}return e.abrupt("return");case 2:if(n=Eo.get(t),r=t.getSelection(),i=n.isFindInputFocused(),o=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&t.getOption(29).seedSearchStringFromSelection&&!i,a=i||o?2:1,!n){e.next=10;break}return e.next=10,n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o,seedSearchStringFromGlobalClipboard:t.getOption(29).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(29).loop});case 10:case"end":return e.stop()}}),e)})))}}]),n}(Q.f);Object(Q.m)(Eo.ID,wo);var jo=new Oo;Object(Q.r)(jo),Object(Q.k)(To),Object(Q.k)(No),Object(Q.k)(Do),Object(Q.k)(Lo),Object(Q.k)(Ao),Object(Q.k)(Ro),Object(Q.k)(Mo);var Fo=new Po;Object(Q.r)(Fo);var Bo=Q.c.bindToContribution(Eo.get);Object(Q.l)(new Bo({id:ti,precondition:Hr,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object(Q.l)(new Bo({id:ni,precondition:void 0,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:Wr.primary,mac:Wr.mac,win:Wr.win,linux:Wr.linux}})),Object(Q.l)(new Bo({id:ri,precondition:void 0,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:Gr.primary,mac:Gr.mac,win:Gr.win,linux:Gr.linux}})),Object(Q.l)(new Bo({id:ii,precondition:void 0,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:qr.primary,mac:qr.mac,win:qr.win,linux:qr.linux}})),Object(Q.l)(new Bo({id:oi,precondition:void 0,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:Kr.primary,mac:Kr.mac,win:Kr.win,linux:Kr.linux}})),Object(Q.l)(new Bo({id:ai,precondition:Hr,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:3094}})),Object(Q.l)(new Bo({id:ai,precondition:Hr,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:te.a.and(X.a.focus,Vr),primary:3}})),Object(Q.l)(new Bo({id:si,precondition:Hr,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:2563}})),Object(Q.l)(new Bo({id:si,precondition:Hr,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:te.a.and(X.a.focus,Vr),primary:void 0,mac:{primary:2051}}})),Object(Q.l)(new Bo({id:li,precondition:Hr,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:515}}));n(493);var Uo=n(33),Ho=16777215,zo=4278190080,Vo=function(){function e(t,n,r){if(Object(Y.a)(this,e),t.length!==n.length||t.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=t,this._endIndexes=n,this._collapseStates=new Uint32Array(Math.ceil(t.length/32)),this._types=r,this._parentsComputed=!1}return Object($.a)(e,[{key:"ensureParentIndices",value:function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],n=function(n,r){var i=t[t.length-1];return e.getStartLineNumber(i)<=n&&e.getEndLineNumber(i)>=r},r=0,i=this._startIndexes.length;rHo||a>Ho)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;t.length>0&&!n(o,a);)t.pop();var s=t.length>0?t[t.length-1]:-1;t.push(r),this._startIndexes[r]=o+((255&s)<<24),this._endIndexes[r]=a+((65280&s)<<16)}}}},{key:"getStartLineNumber",value:function(e){return this._startIndexes[e]&Ho}},{key:"getEndLineNumber",value:function(e){return this._endIndexes[e]&Ho}},{key:"getType",value:function(e){return this._types?this._types[e]:void 0}},{key:"hasTypes",value:function(){return!!this._types}},{key:"isCollapsed",value:function(e){var t=e/32|0,n=e%32;return 0!==(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&zo)>>>16);return 65535===t?-1:t}},{key:"contains",value:function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}},{key:"findIndex",value:function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}},{key:"toString",value:function(){for(var e=[],t=0;t=this.endLineNumber}},{key:"containsLine",value:function(e){return this.startLineNumber<=e&&e<=this.endLineNumber}},{key:"startLineNumber",get:function(){return this.ranges.getStartLineNumber(this.index)}},{key:"endLineNumber",get:function(){return this.ranges.getEndLineNumber(this.index)}},{key:"regionIndex",get:function(){return this.index}},{key:"parentIndex",get:function(){return this.ranges.getParentIndex(this.index)}},{key:"isCollapsed",get:function(){return this.ranges.isCollapsed(this.index)}}]),e}(),Go=function(){function e(t,n){Object(Y.a)(this,e),this._updateEventEmitter=new en.a,this.onDidChange=this._updateEventEmitter.event,this._textModel=t,this._decorationProvider=n,this._regions=new Vo(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object($.a)(e,[{key:"toggleCollapseState",value:function(e){var t=this;if(e.length){e=e.sort((function(e,t){return e.regionIndex-t.regionIndex}));var n={};this._decorationProvider.changeDecorations((function(r){var i,o=0,a=-1,s=-1,l=function(e){for(;os&&(s=n),o++}},c=Object(Ce.a)(e);try{for(c.s();!(i=c.n()).done;){var u=i.value.regionIndex,d=t._editorDecorationIds[u];if(d&&!n[d]){n[d]=!0,l(u);var h=!t._regions.isCollapsed(u);t._regions.setCollapsed(u,h),a=Math.max(a,t._regions.getEndLineNumber(u))}}}catch(f){c.e(f)}finally{c.f()}l(t._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}}},{key:"update",value:function(e){for(var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],i=function(e,t){var r,i=Object(Ce.a)(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(eo&&(o=l)},s=0,l=function(){for(;s=f))break;a(c,h===f),c++}}u=l()}for(;c0)return e}},{key:"applyMemento",value:function(e){if(Array.isArray(e)){var t,n=[],r=Object(Ce.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=this.getRegionAtLine(i.startLineNumber);o&&!o.isCollapsed&&n.push(o)}}catch(a){r.e(a)}finally{r.f()}this.toggleCollapseState(n)}}},{key:"dispose",value:function(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}},{key:"getAllRegionsAtLine",value:function(e,t){var n=[];if(this._regions)for(var r=this._regions.findRange(e),i=1;r>=0;){var o=this._regions.toRegion(r);t&&!t(o,i)||n.push(o),i++,r=o.parentIndex}return n}},{key:"getRegionAtLine",value:function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}},{key:"getRegionsInside",value:function(e,t){var n=[],r=e?e.regionIndex+1:0,i=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length)for(var o=[],a=r,s=this._regions.length;a0&&!l.containedBy(o[o.length-1]);)o.pop();o.push(l),t(l,o.length)&&n.push(l)}else for(var c=r,u=this._regions.length;c2&&void 0!==arguments[2]?arguments[2]:Number.MAX_VALUE,r=arguments.length>3?arguments[3]:void 0,i=[];if(r&&r.length>0){var o,a=Object(Ce.a)(r);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=e.getRegionAtLine(s);if(l&&(l.isCollapsed!==t&&i.push(l),n>1)){var c=e.getRegionsInside(l,(function(e,r){return e.isCollapsed!==t&&r=0;a--)if(n!==i.isCollapsed(a)){var s=i.getStartLineNumber(a);t.test(r.getLineContent(s))&&o.push(i.toRegion(a))}e.toggleCollapseState(o)}function $o(e,t,n){for(var r=e.regions,i=[],o=r.length-1;o>=0;o--)n!==r.isCollapsed(o)&&t===r.getType(o)&&i.push(r.toRegion(o));e.toggleCollapseState(i)}var Qo=Object(re.e)("folding-expanded",re.a.chevronDown),Zo=Object(re.e)("folding-collapsed",re.a.chevronRight),Xo=function(){function e(t){Object(Y.a)(this,e),this.editor=t,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}return Object($.a)(e,[{key:"getDecorationOption",value:function(t,n){return n?e.HIDDEN_RANGE_DECORATION:t?this.showFoldingHighlights?e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION}},{key:"deltaDecorations",value:function(e,t){return this.editor.deltaDecorations(e,t)}},{key:"changeDecorations",value:function(e){return this.editor.changeDecorations(e)}}]),e}();Xo.COLLAPSED_VISUAL_DECORATION=Ne.a.register({stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Zo.classNames}),Xo.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ne.a.register({stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:Zo.classNames}),Xo.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ne.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Qo.classNames}),Xo.EXPANDED_VISUAL_DECORATION=Ne.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Qo.classNames}),Xo.HIDDEN_RANGE_DECORATION=Ne.a.register({stickiness:1});var Jo=function(){function e(t){var n=this;Object(Y.a)(this,e),this._updateEventEmitter=new en.a,this._foldingModel=t,this._foldingModelListener=t.onDidChange((function(e){return n.updateHiddenRanges()})),this._hiddenRanges=[],t.regions.length&&this.updateHiddenRanges()}return Object($.a)(e,[{key:"updateHiddenRanges",value:function(){for(var e=!1,t=[],n=0,r=0,i=Number.MAX_VALUE,o=-1,a=this._foldingModel.regions;n0}},{key:"isHidden",value:function(e){return null!==ea(this._hiddenRanges,e)}},{key:"adjustSelections",value:function(e){for(var t=this,n=!1,r=this._foldingModel.textModel,i=null,o=function(e){return i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=ea(t._hiddenRanges,e)),i?i.startLineNumber-1:null},a=0,s=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}},{key:"onDidChange",get:function(){return this._updateEventEmitter.event}},{key:"hiddenRanges",get:function(){return this._hiddenRanges}}]),e}();function ea(e,t){var n=Object(ne.h)(e,(function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}var ta=5e3,na=function(){function e(t){Object(Y.a)(this,e),this.editorModel=t,this.id="indent"}return Object($.a)(e,[{key:"dispose",value:function(){}},{key:"compute",value:function(e){var t=cr.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ta,i=e.getOptions().tabSize,o=new ra(r),a=void 0;n&&(a=new RegExp("(".concat(n.start.source,")|(?:").concat(n.end.source,")")));var s=[],l=e.getLineCount()+1;s.push({indent:-1,endAbove:l,line:l});for(var c=e.getLineCount();c>0;c--){var u=e.getLineContent(c),d=Ne.b.computeIndentLevel(u,i),h=s[s.length-1];if(-1!==d){var f=void 0;if(a&&(f=u.match(a))){if(!f[1]){s.push({indent:-2,endAbove:c,line:c});continue}for(var p=s.length-1;p>0&&-2!==s[p].indent;)p--;if(p>0){s.length=p+1,h=s[p],o.insertFirst(c,h.line,d),h.line=c,h.indent=d,h.endAbove=c;continue}}if(h.indent>d){do{s.pop(),h=s[s.length-1]}while(h.indent>d);var g=h.endAbove-1;g-c>=1&&o.insertFirst(c,g,d)}h.indent===d?h.endAbove=c:s.push({indent:d,endAbove:c,line:c})}else t&&(h.endAbove=c)}return o.toIndentRanges(e)}(this.editorModel,n,r))}}]),e}(),ra=function(){function e(t){Object(Y.a)(this,e),this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=t}return Object($.a)(e,[{key:"insertFirst",value:function(e,t,n){if(!(e>Ho||t>Ho)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}}},{key:"toIndentRanges",value:function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),n=new Uint32Array(this._length),r=this._length-1,i=0;r>=0;r--,i++)t[i]=this._startIndexes[r],n[i]=this._endIndexes[r];return new Vo(t,n)}for(var o=0,a=this._indentOccurrences.length,s=0;sthis._foldingRangesLimit){a=s;break}o+=l}}for(var c=e.getOptions().tabSize,u=new Uint32Array(this._foldingRangesLimit),d=new Uint32Array(this._foldingRangesLimit),h=this._length-1,f=0;h>=0;h--){var p=this._startIndexes[h],g=e.getLineContent(p),m=Ne.b.computeIndentLevel(g,c);(m2&&void 0!==arguments[2]?arguments[2]:5e3;Object(Y.a)(this,e),this.editorModel=t,this.providers=n,this.limit=r,this.id=oa}return Object($.a)(e,[{key:"compute",value:function(e){var t=this;return function(e,t,n){var r=null,i=e.map((function(e,i){return Promise.resolve(e.provideFoldingRanges(t,ia,n)).then((function(e){if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(r)||(r=[]);var o,a=t.getLineCount(),s=Object(Ce.a)(e);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.start>0&&l.end>l.start&&l.end<=a&&r.push({start:l.start,end:l.end,rank:i,kind:l.kind})}}catch(c){s.e(c)}finally{s.f()}}}),ie.f)}));return Promise.all(i).then((function(e){return r}))}(this.providers,this.editorModel,e).then((function(e){return e?la(e,t.limit):null}))}},{key:"dispose",value:function(){}}]),e}();var sa=function(){function e(t){Object(Y.a)(this,e),this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}return Object($.a)(e,[{key:"add",value:function(e,t,n,r){if(!(e>Ho||t>Ho)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._nestingLevels[i]=r,this._types[i]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}}},{key:"toIndentRanges",value:function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){i=o;break}r+=a}}for(var s=new Uint32Array(this._foldingRangesLimit),l=new Uint32Array(this._foldingRangesLimit),c=[],u=0,d=0;uo.start)if(l.end<=o.end)a.push(o),o=l,i.add(l.start,l.end,l.kind&&l.kind.value,a.length);else{if(l.start>o.end){do{o=a.pop()}while(o&&l.start>o.end);o&&a.push(o),o=l}i.add(l.start,l.end,l.kind&&l.kind.value,a.length)}}else o=l,i.add(l.start,l.end,l.kind&&l.kind.value,a.length)}}catch(c){s.e(c)}finally{s.f()}return i.toIndentRanges()}var ca="init",ua=function(){function e(t,n,r,i){if(Object(Y.a)(this,e),this.editorModel=t,this.id=ca,n.length){this.decorationIds=t.deltaDecorations([],n.map((function(e){return{range:{startLineNumber:e.startLineNumber,startColumn:0,endLineNumber:e.endLineNumber,endColumn:t.getLineLength(e.endLineNumber)},options:{stickiness:1}}}))),this.timeout=setTimeout(r,i)}}return Object($.a)(e,[{key:"dispose",value:function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"===typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}},{key:"compute",value:function(e){var t=[];if(this.decorationIds){var n,r=Object(Ce.a)(this.decorationIds);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=this.editorModel.getDecorationRange(i);o&&t.push({start:o.startLineNumber,end:o.endLineNumber,rank:1})}}catch(a){r.e(a)}finally{r.f()}}return Promise.resolve(la(t,Number.MAX_VALUE))}}]),e}(),da=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ha=function(e,t){return function(n,r){t(n,r,e)}},fa=new te.c("foldingEnabled",!1),pa=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this)).contextKeyService=r,i.localToDispose=i._register(new we.b),i.editor=e;var o=i.editor.getOptions();return i._isEnabled=o.get(31),i._useFoldingProviders="indentation"!==o.get(32),i._unfoldOnClickAfterEndOfLine=o.get(34),i.foldingModel=null,i.hiddenRangeModel=null,i.rangeProvider=null,i.foldingRegionPromise=null,i.foldingStateMemento=null,i.foldingModelPromise=null,i.updateScheduler=null,i.cursorChangedScheduler=null,i.mouseDownInfo=null,i.foldingDecorationProvider=new Xo(e),i.foldingDecorationProvider.autoHideFoldingControls="mouseover"===o.get(91),i.foldingDecorationProvider.showFoldingHighlights=o.get(33),i.foldingEnabled=fa.bindTo(i.contextKeyService),i.foldingEnabled.set(i._isEnabled),i._register(i.editor.onDidChangeModel((function(){return i.onModelChanged()}))),i._register(i.editor.onDidChangeConfiguration((function(e){if(e.hasChanged(31)&&(i._isEnabled=i.editor.getOptions().get(31),i.foldingEnabled.set(i._isEnabled),i.onModelChanged()),e.hasChanged(91)||e.hasChanged(33)){var t=i.editor.getOptions();i.foldingDecorationProvider.autoHideFoldingControls="mouseover"===t.get(91),i.foldingDecorationProvider.showFoldingHighlights=t.get(33),i.onModelContentChanged()}e.hasChanged(32)&&(i._useFoldingProviders="indentation"!==i.editor.getOptions().get(32),i.onFoldingStrategyChanged()),e.hasChanged(34)&&(i._unfoldOnClickAfterEndOfLine=i.editor.getOptions().get(34))}))),i.onModelChanged(),i}return Object($.a)(n,[{key:"saveViewState",value:function(){var e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){var t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n}}}},{key:"restoreViewState",value:function(e){var t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&e.collapsedRegions&&e.lineCount===t.getLineCount()){e.provider!==oa&&e.provider!==ca||(this.foldingStateMemento=e);var n=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(n)){var r=this.getFoldingModel();r&&r.then((function(e){e&&e.applyMemento(n)})).then(void 0,ie.e)}}}},{key:"onModelChanged",value:function(){var e=this;this.localToDispose.clear();var t=this.editor.getModel();this._isEnabled&&t&&!t.isTooLargeForTokenization()&&(this.foldingModel=new Go(t,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Jo(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((function(t){return e.onHiddenRangesChanges(t)}))),this.updateScheduler=new Ee.a(200),this.cursorChangedScheduler=new Ee.d((function(){return e.revealCursor()}),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(vt.o.onDidChange((function(){return e.onFoldingStrategyChanged()}))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((function(){return e.onFoldingStrategyChanged()}))),this.localToDispose.add(this.editor.onDidChangeModelContent((function(){return e.onModelContentChanged()}))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((function(){return e.onCursorPositionChanged()}))),this.localToDispose.add(this.editor.onMouseDown((function(t){return e.onEditorMouseDown(t)}))),this.localToDispose.add(this.editor.onMouseUp((function(t){return e.onEditorMouseUp(t)}))),this.localToDispose.add({dispose:function(){e.foldingRegionPromise&&(e.foldingRegionPromise.cancel(),e.foldingRegionPromise=null),e.updateScheduler&&e.updateScheduler.cancel(),e.updateScheduler=null,e.foldingModel=null,e.foldingModelPromise=null,e.hiddenRangeModel=null,e.cursorChangedScheduler=null,e.foldingStateMemento=null,e.rangeProvider&&e.rangeProvider.dispose(),e.rangeProvider=null}}),this.onModelContentChanged())}},{key:"onFoldingStrategyChanged",value:function(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}},{key:"getRangeProvider",value:function(e){var t=this;if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new na(e),this._useFoldingProviders&&this.foldingModel){var n=vt.o.ordered(this.foldingModel.textModel);if(0===n.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new ua(e,this.foldingStateMemento.collapsedRegions,(function(){t.foldingStateMemento=null,t.onFoldingStrategyChanged()}),3e4);n.length>0&&(this.rangeProvider=new aa(e,n))}return this.foldingStateMemento=null,this.rangeProvider}},{key:"getFoldingModel",value:function(){return this.foldingModelPromise}},{key:"onModelContentChanged",value:function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){var t=e.foldingModel;if(!t)return null;var n=e.foldingRegionPromise=Object(Ee.f)((function(n){return e.getRangeProvider(t.textModel).compute(n)}));return n.then((function(r){if(r&&n===e.foldingRegionPromise){var i=e.editor.getSelections(),o=i?i.map((function(e){return e.startLineNumber})):[];t.update(r,o)}return t}))})).then(void 0,(function(e){return Object(ie.e)(e),null})))}},{key:"onHiddenRangesChanges",value:function(e){if(this.hiddenRangeModel&&e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)}},{key:"onCursorPositionChanged",value:function(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}},{key:"revealCursor",value:function(){var e=this,t=this.getFoldingModel();t&&t.then((function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){var r,i=[],o=Object(Ce.a)(n);try{var a=function(){var n=r.value.selectionStartLineNumber;e.hiddenRangeModel&&e.hiddenRangeModel.isHidden(n)&&i.push.apply(i,Object(ct.a)(t.getAllRegionsAtLine(n,(function(e){return e.isCollapsed&&n>e.startLineNumber}))))};for(o.s();!(r=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}i.length&&(t.toggleCollapseState(i),e.reveal(n[0].getPosition()))}}})).then(void 0,ie.e)}},{key:"onEditorMouseDown",value:function(e){if(this.mouseDownInfo=null,this.hiddenRangeModel&&e.target&&e.target.range&&(e.event.leftButton||e.event.middleButton)){var t=e.target.range,n=!1;switch(e.target.type){case 4:var r=e.target.detail,i=e.target.element.offsetLeft;if(r.offsetX-i<5)return;n=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges())if(!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){var o=this.editor.getModel();if(o&&t.startColumn===o.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}}},{key:"onEditorMouseUp",value:function(e){var t=this,n=this.getFoldingModel();if(n&&this.mouseDownInfo&&e.target){var r=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===r){if(i){if(4!==e.target.type)return}else{var a=this.editor.getModel();if(!a||o.startColumn!==a.getLineMaxColumn(r))return}n.then((function(n){if(n){var o=n.getRegionAtLine(r);if(o&&o.startLineNumber===r){var a=o.isCollapsed;if(i||a){var s=[],l=e.event.middleButton||e.event.shiftKey;if(l){var c,u=Object(Ce.a)(n.getRegionsInside(o));try{for(u.s();!(c=u.n()).done;){var d=c.value;d.isCollapsed===a&&s.push(d)}}catch(h){u.e(h)}finally{u.f()}}!a&&l&&0!==s.length||s.push(o),n.toggleCollapseState(s),t.reveal({lineNumber:r,column:1})}}}})).then(void 0,ie.e)}}}},{key:"reveal",value:function(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);pa.ID="editor.contrib.folding",pa=da([ha(1,te.b)],pa);var ga=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this,i=pa.get(t);if(i){var o=i.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((function(e){if(e){r.invoke(i,e,t,n);var o=t.getSelection();o&&i.reveal(o.getStartPosition())}}))):void 0}}},{key:"getSelectedLines",value:function(e){var t=e.getSelections();return t?t.map((function(e){return e.startLineNumber})):[]}},{key:"getLineNumbers",value:function(e,t){return e&&e.selectionLines?e.selectionLines.map((function(e){return e+1})):this.getSelectedLines(t)}},{key:"run",value:function(e,t){}}]),n}(Q.b);function ma(e){if(!Uo.k(e)){if(!Uo.i(e))return!1;var t=e;if(!Uo.k(t.levels)&&!Uo.h(t.levels))return!1;if(!Uo.k(t.direction)&&!Uo.j(t.direction))return!1;if(!Uo.k(t.selectionLines)&&(!Uo.e(t.selectionLines)||!t.selectionLines.every(Uo.h)))return!1}return!0}var va=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.unfold",label:Z.a("unfoldAction.label","Unfold"),alias:"Unfold",precondition:fa,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:ma,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}return Object($.a)(n,[{key:"invoke",value:function(e,t,n,r){var i=r&&r.levels||1,o=this.getLineNumbers(r,n);r&&"up"===r.direction?Ko(t,!1,i,o):qo(t,!1,i,o)}}]),n}(ga),_a=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.unfoldRecursively",label:Z.a("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:fa,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2137),weight:100}})}return Object($.a)(n,[{key:"invoke",value:function(e,t,n,r){qo(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}]),n}(ga),ba=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.fold",label:Z.a("foldAction.label","Fold"),alias:"Fold",precondition:fa,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:ma,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}return Object($.a)(n,[{key:"invoke",value:function(e,t,n,r){var i=this.getLineNumbers(r,n),o=r&&r.levels,a=r&&r.direction;"number"!==typeof o&&"string"!==typeof a?function(e,t,n){var r,i=[],o=Object(Ce.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=e.getAllRegionsAtLine(a,(function(e){return e.isCollapsed!==t}));s.length>0&&i.push(s[0])}}catch(l){o.e(l)}finally{o.f()}e.toggleCollapseState(i)}(t,!0,i):"up"===a?Ko(t,!0,o||1,i):qo(t,!0,o||1,i)}}]),n}(ga),ya=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.toggleFold",label:Z.a("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:fa,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2090),weight:100}})}return Object($.a)(n,[{key:"invoke",value:function(e,t,n){!function(e,t,n){var r,i=[],o=Object(Ce.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=e.getRegionAtLine(a);s&&function(){var n=!s.isCollapsed;if(i.push(s),t>1){var r=e.getRegionsInside(s,(function(e,r){return e.isCollapsed!==n&&r0&&Te.a.areIntersectingOrTouching(c[u-1],f)?c[u-1]=Te.a.fromPositions(c[u-1].getStartPosition(),f.getEndPosition()):u=c.push(f)}catch(C){d.e(C)}finally{d.f()}p=[],g=0,m=c;case 8:if(!(g1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},es=function(e,t){return function(n,r){t(n,r,e)}},ts=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ns=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._workerService=n,this._callOnDispose=new we.b,this._callOnModel=new we.b,this._editor=t,this._callOnDispose.add(t.onDidChangeConfiguration((function(){return r._update()}))),this._callOnDispose.add(t.onDidChangeModel((function(){return r._update()}))),this._callOnDispose.add(t.onDidChangeModelLanguage((function(){return r._update()}))),this._callOnDispose.add(vt.t.onDidChange(this._update,this))}return Object($.a)(e,[{key:"dispose",value:function(){this._callOnDispose.dispose(),this._callOnModel.dispose()}},{key:"_update",value:function(){var e=this;if(this._callOnModel.clear(),this._editor.getOption(41)&&this._editor.hasModel()){var t=this._editor.getModel(),n=vt.t.ordered(t),r=Object(ke.a)(n,1)[0];if(r&&r.autoFormatTriggerCharacters){var i,o=new Ma.b,a=Object(Ce.a)(r.autoFormatTriggerCharacters);try{for(a.s();!(i=a.n()).done;){var s=i.value;o.add(s.charCodeAt(0))}}catch(l){a.e(l)}finally{a.f()}this._callOnModel.add(this._editor.onDidType((function(t){var n=t.charCodeAt(t.length-1);o.has(n)&&e._trigger(String.fromCharCode(n))})))}}}},{key:"_trigger",value:function(e){var t=this;if(this._editor.hasModel()&&!(this._editor.getSelections().length>1)){var n=this._editor.getModel(),r=this._editor.getPosition(),i=!1,o=this._editor.onDidChangeModelContent((function(e){if(e.isFlush)return i=!0,void o.dispose();for(var t=0,n=e.changes.length;t1||this._instantiationService.invokeFunction(qa,this.editor,e,2,kt.b.None,pt.a.None).catch(ie.e))}}]),e}();rs.ID="editor.contrib.formatOnPaste",rs=Ja([es(1,Ht.a)],rs);var is=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.formatDocument",label:Z.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:te.a.and(X.a.notInCompositeEditor,X.a.writable,X.a.hasDocumentFormattingProvider),kbOpts:{kbExpr:te.a.and(X.a.editorTextFocus,X.a.hasDocumentFormattingProvider),primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{when:X.a.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})}return Object($.a)(n,[{key:"run",value:function(e,t){return ts(this,void 0,void 0,G.a.mark((function n(){var r,i;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t.hasModel()){n.next=5;break}return r=e.get(Ht.a),i=e.get(kt.a),n.next=5,i.showWhile(r.invokeFunction(Ya,t,1,kt.b.None,pt.a.None),250);case 5:case"end":return n.stop()}}),n)})))}}]),n}(Q.b),os=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.formatSelection",label:Z.a("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:te.a.and(X.a.writable,X.a.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:te.a.and(X.a.editorTextFocus,X.a.hasDocumentSelectionFormattingProvider),primary:Object(ee.a)(2089,2084),weight:100},contextMenuOpts:{when:te.a.and(X.a.hasDocumentSelectionFormattingProvider,X.a.hasNonEmptySelection),group:"1_modification",order:1.31}})}return Object($.a)(n,[{key:"run",value:function(e,t){return ts(this,void 0,void 0,G.a.mark((function n(){var r,i,o,a;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.hasModel()){n.next=2;break}return n.abrupt("return");case 2:return r=e.get(Ht.a),i=t.getModel(),o=t.getSelections().map((function(e){return e.isEmpty()?new Te.a(e.startLineNumber,1,e.startLineNumber,i.getLineMaxColumn(e.startLineNumber)):e})),a=e.get(kt.a),n.next=8,a.showWhile(r.invokeFunction(qa,t,o,1,kt.b.None,pt.a.None),250);case 8:case"end":return n.stop()}}),n)})))}}]),n}(Q.b);Object(Q.m)(ns.ID,ns),Object(Q.m)(rs.ID,rs),Object(Q.k)(is),Object(Q.k)(os),dn.a.registerCommand("editor.action.format",(function(e){return ts(void 0,void 0,void 0,G.a.mark((function t(){var n,r;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.get($e.a).getFocusedCodeEditor())&&n.hasModel()){t.next=3;break}return t.abrupt("return");case 3:if(r=e.get(dn.b),!n.getSelection().isEmpty()){t.next=9;break}return t.next=7,r.executeCommand("editor.action.formatDocument");case 7:t.next=11;break;case 9:return t.next=11,r.executeCommand("editor.action.formatSelection");case 11:case"end":return t.stop()}}),t)})))}));var as=n(130),ss=n(124),ls=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"remove",value:function(){this.parent&&this.parent.children.delete(this.id)}}],[{key:"findId",value:function(e,t){var n;"string"===typeof e?n="".concat(t.id,"/").concat(e):(n="".concat(t.id,"/").concat(e.name),void 0!==t.children.get(n)&&(n="".concat(t.id,"/").concat(e.name,"_").concat(e.range.startLineNumber,"_").concat(e.range.startColumn)));for(var r=n,i=0;void 0!==t.children.get(r);i++)r="".concat(n,"_").concat(i);return r}},{key:"empty",value:function(e){return 0===e.children.size}}]),e}(),cs=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this)).id=e,o.parent=r,o.symbol=i,o.children=new Map,o}return n}(ls),us=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this)).id=e,a.parent=r,a.label=i,a.order=o,a.children=new Map,a}return n}(ls),ds=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).uri=e,r.id="root",r.parent=void 0,r._groups=new Map,r.children=new Map,r.id="root",r.parent=void 0,r}return Object($.a)(n,[{key:"_compact",value:function(){var e,t=0,n=Object(Ce.a)(this._groups);try{for(n.s();!(e=n.n()).done;){var r=Object(ke.a)(e.value,2),i=r[0];0===r[1].children.size?this._groups.delete(i):t+=1}}catch(c){n.e(c)}finally{n.f()}if(1!==t)this.children=this._groups;else{var o,a=Ha.a.first(this._groups.values()),s=Object(Ce.a)(a.children);try{for(s.s();!(o=s.n()).done;){var l=Object(ke.a)(o.value,2)[1];l.parent=this,this.children.set(l.id,l)}}catch(c){s.e(c)}finally{s.f()}}return this}}],[{key:"create",value:function(e,t){var r=this,i=this._keys.for(e,!0),o=n._requests.get(i);if(!o){var a=new pt.b;o={promiseCnt:0,source:a,promise:n._create(e,a.token),model:void 0},n._requests.set(i,o);var s=Date.now();o.promise.then((function(){var t=r._keys.for(e,!1),n=r._requestDurations.get(t);n||(n=new ss.a,r._requestDurations.set(t,n)),n.update(Date.now()-s)}))}return o.model?Promise.resolve(o.model):(o.promiseCnt+=1,t.onCancellationRequested((function(){0===--o.promiseCnt&&(o.source.cancel(),n._requests.delete(i))})),new Promise((function(e,t){o.promise.then((function(t){o.model=t,e(t)}),(function(e){n._requests.delete(i),t(e)}))})))}},{key:"_create",value:function(e,t){var r=new pt.b(t),i=new n(e.uri),o=vt.m.ordered(e),a=o.map((function(t,o){var a,s=ls.findId("provider_".concat(o),i),l=new us(s,i,null!==(a=t.displayName)&&void 0!==a?a:"Unknown Outline Provider",o);return Promise.resolve(t.provideDocumentSymbols(e,r.token)).then((function(e){var t,r=Object(Ce.a)(e||[]);try{for(r.s();!(t=r.n()).done;){var i=t.value;n._makeOutlineElement(i,l)}}catch(o){r.e(o)}finally{r.f()}return l}),(function(e){return Object(ie.f)(e),l})).then((function(e){ls.empty(e)?e.remove():i._groups.set(s,e)}))})),s=vt.m.onDidChange((function(){var t=vt.m.ordered(e);Object(ne.g)(t,o)||r.cancel()}));return Promise.all(a).then((function(){return r.token.isCancellationRequested&&!t.isCancellationRequested?n._create(e,t):i._compact()})).finally((function(){s.dispose()}))}},{key:"_makeOutlineElement",value:function(e,t){var r=ls.findId(e,t),i=new cs(r,t,e);if(e.children){var o,a=Object(Ce.a)(e.children);try{for(a.s();!(o=a.n()).done;){var s=o.value;n._makeOutlineElement(s,i)}}catch(l){a.e(l)}finally{a.f()}}t.children.set(i.id,i)}}]),n}(ls);ds._requestDurations=new zn.a(50,.7),ds._requests=new zn.a(9,.75),ds._keys=new(function(){function e(){Object(Y.a)(this,e),this._counter=1,this._data=new WeakMap}return Object($.a)(e,[{key:"for",value:function(e,t){return"".concat(e.id,"/").concat(t?e.getVersionId():"","/").concat(this._hash(vt.m.all(e)))}},{key:"_hash",value:function(e){var t,n="",r=Object(Ce.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=this._data.get(i);"undefined"===typeof o&&(o=this._counter++,this._data.set(i,o)),n+=o}}catch(a){r.e(a)}finally{r.f()}return n}}]),e}());var hs=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function fs(e,t,n){return hs(this,void 0,void 0,G.a.mark((function r(){var i,o,a,s,l,c;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ds.create(e,n);case 2:i=r.sent,o=[],a=Object(Ce.a)(i.children.values());try{for(a.s();!(s=a.n()).done;)(l=s.value)instanceof cs?o.push(l.symbol):o.push.apply(o,Object(ct.a)(Ha.a.map(l.children.values(),(function(e){return e.symbol}))))}catch(u){a.e(u)}finally{a.f()}if(c=[],!n.isCancellationRequested){r.next=9;break}return r.abrupt("return",c);case 9:return t?gs(c,o,""):c=o,r.abrupt("return",c.sort(ps));case 11:case"end":return r.stop()}}),r)})))}function ps(e,t){return Te.a.compareRangesUsingStarts(e.range,t.range)}function gs(e,t,n){var r,i=Object(Ce.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||n,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&gs(e,o.children,o.name)}}catch(a){i.e(a)}finally{i.f()}}dn.a.registerCommand("_executeDocumentSymbolProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},ys=function(e,t){return function(n,r){t(n,r,e)}},Ss=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s,l,c,u,d){var h,f;return Object(Y.a)(this,n),(f=t.call(this,e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},o,a,s,l,c,u,d))._parentEditor=i,f._overwriteOptions=r,Object(Rt.a)((h=Object(ut.a)(f),Object(Mt.a)(n.prototype)),"updateOptions",h).call(h,f._overwriteOptions),f._register(i.onDidChangeConfiguration((function(e){return f._onParentConfigurationChanged(e)}))),f}return Object($.a)(n,[{key:"getParentEditor",value:function(){return this._parentEditor}},{key:"_onParentConfigurationChanged",value:function(e){Object(Rt.a)(Object(Mt.a)(n.prototype),"updateOptions",this).call(this,this._parentEditor.getRawOptions()),Object(Rt.a)(Object(Mt.a)(n.prototype),"updateOptions",this).call(this,this._overwriteOptions)}},{key:"updateOptions",value:function(e){vs.g(this._overwriteOptions,e,!0),Object(Rt.a)(Object(Mt.a)(n.prototype),"updateOptions",this).call(this,this._overwriteOptions)}}]),n}(V.a);Ss=bs([ys(3,Ht.a),ys(4,$e.a),ys(5,dn.b),ys(6,te.b),ys(7,Ae.c),ys(8,fn.a),ys(9,_s.b)],Ss);n(495);var Cs=n(163),ks=new nr.a(new nr.c(0,122,204)),Es={showArrow:!0,showFrame:!0,className:"",frameColor:ks,arrowColor:ks,keepEditorSelection:!1},ws=function(){function e(t,n,r,i,o,a){Object(Y.a)(this,e),this.id="",this.domNode=t,this.afterLineNumber=n,this.afterColumn=r,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=a}return Object($.a)(e,[{key:"onDomNodeTop",value:function(e){this._onDomNodeTop(e)}},{key:"onComputedHeight",value:function(e){this._onComputedHeight(e)}}]),e}(),Os=function(){function e(t,n){Object(Y.a)(this,e),this._id=t,this._domNode=n}return Object($.a)(e,[{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return null}}]),e}(),Ts=function(){function e(t){Object(Y.a)(this,e),this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}return Object($.a)(e,[{key:"dispose",value:function(){this.hide(),zt.removeCSSRulesContainingSelector(this._ruleName)}},{key:"_updateStyle",value:function(){zt.removeCSSRulesContainingSelector(this._ruleName),zt.createCSSRule(".monaco-editor ".concat(this._ruleName),"border-style: solid; border-color: transparent; border-bottom-color: ".concat(this._color,"; border-width: ").concat(this._height,"px; bottom: -").concat(this._height,"px; margin-left: -").concat(this._height,"px; "))}},{key:"show",value:function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:Te.a.fromPositions(e),options:{className:this._ruleName,stickiness:1}}])}},{key:"hide",value:function(){this._editor.deltaDecorations(this._decorations,[])}},{key:"color",set:function(e){this._color!==e&&(this._color=e,this._updateStyle())}},{key:"height",set:function(e){this._height!==e&&(this._height=e,this._updateStyle())}}]),e}();Ts._IdGenerator=new Cs.a(".arrow-decoration-");var xs=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(Y.a)(this,e),this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new we.b,this.container=null,this._isShowing=!1,this.editor=t,this.options=vs.c(r),vs.g(this.options,Es,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)})))}return Object($.a)(e,[{key:"dispose",value:function(){var e=this;this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}},{key:"create",value:function(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Ts(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}},{key:"style",value:function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}},{key:"_applyStyles",value:function(){if(this.container&&this.options.frameColor){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){var t=this.options.arrowColor.toString();this._arrow.color=t}}},{key:"_getWidth",value:function(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}},{key:"_getLeft",value:function(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}},{key:"_onViewZoneTop",value:function(e){this.domNode.style.top=e+"px"}},{key:"_onViewZoneHeight",value:function(e){if(this.domNode.style.height="".concat(e,"px"),this.container){var t=e-this._decoratingElementsHeight();this.container.style.height="".concat(t,"px");var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()}},{key:"show",value:function(e,t){var n=Te.a.isIRange(e)?Te.a.lift(e):Te.a.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:Ne.a.EMPTY}])}},{key:"hide",value:function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}},{key:"_decoratingElementsHeight",value:function(){var e=this.editor.getOption(51),t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t}},{key:"_showImpl",value:function(e,t){var n=this,r=e.getStartPosition(),i=this.editor.getLayoutInfo(),o=this._getWidth(i);this.domNode.style.width="".concat(o,"px"),this.domNode.style.left=this._getLeft(i)+"px";var a=document.createElement("div");a.style.overflow="hidden";var s=this.editor.getOption(51),l=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,l);var c=0,u=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(s/3),this._arrow.height=c,this._arrow.show(r)),this.options.showFrame&&(u=Math.round(s/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new ws(a,r.lineNumber,r.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new Os("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.container&&this.options.showFrame){var d=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=d+"px",this.container.style.borderBottomWidth=d+"px"}var h=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden"),this._doLayout(h,o),this.options.keepEditorSelection||this.editor.setSelection(e);var f=this.editor.getModel();if(f){var p=e.endLineNumber+1;p<=f.getLineCount()?this.revealLine(p,!1):this.revealLine(f.getLineCount(),!0)}}},{key:"revealLine",value:function(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}},{key:"setCssClass",value:function(e,t){this.container&&(t&&this.container.classList.remove(t),zt.addClass(this.container,e))}},{key:"_onWidth",value:function(e){}},{key:"_doLayout",value:function(e,t){}},{key:"_relayout",value:function(e){var t=this;this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone&&(t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id))}))}},{key:"_initSash",value:function(){var e,t=this;this._resizeSash||(this._resizeSash=this._disposables.add(new ki.a(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((function(n){if(e){var r=(n.currentY-e.startY)/t.editor.getOption(51),i=r<0?Math.ceil(r):Math.floor(r),o=e.heightInLines+i;o>5&&o<35&&t._relayout(o)}}))))}},{key:"getHorizontalSashLeft",value:function(){return 0}},{key:"getHorizontalSashTop",value:function(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}},{key:"getHorizontalSashWidth",value:function(){var e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}},{key:"position",get:function(){var e=Object(ke.a)(this._positionMarkerId,1)[0];if(e){var t=this.editor.getModel();if(t){var n=t.getDecorationRange(e);if(n)return n.getStartPosition()}}}}]),e}(),Ns=n(52),Ds=(n(316),n(75)),Ls=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e,r))._actions=[],i._contextMenuProvider=r.contextMenuProvider,i.actions=r.actions||[],i.actionProvider=r.actionProvider,i.menuClassName=r.menuClassName||"",i.menuAsChild=!!r.menuAsChild,i}return Object($.a)(n,[{key:"show",value:function(){var e=this;Object(Rt.a)(Object(Mt.a)(n.prototype),"show",this).call(this),Object(zt.addClass)(this.element,"active"),this._contextMenuProvider.showContextMenu({getAnchor:function(){return e.element},getActions:function(){return e.actions},getActionsContext:function(){return e.menuOptions?e.menuOptions.context:null},getActionViewItem:function(t){return e.menuOptions&&e.menuOptions.actionViewItemProvider?e.menuOptions.actionViewItemProvider(t):void 0},getKeyBinding:function(t){return e.menuOptions&&e.menuOptions.getKeyBinding?e.menuOptions.getKeyBinding(t):void 0},getMenuClassName:function(){return e.menuClassName},onHide:function(){return e.onHide()},actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}},{key:"hide",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"hide",this).call(this)}},{key:"onHide",value:function(){this.hide(),Object(zt.removeClass)(this.element,"active")}},{key:"menuOptions",set:function(e){this._menuOptions=e},get:function(){return this._menuOptions}},{key:"actions",get:function(){return this.actionProvider?this.actionProvider.getActions():this._actions},set:function(e){this._actions=e}}]),n}(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this))._onDidChangeVisibility=new en.a,i.onDidChangeVisibility=i._onDidChangeVisibility.event,i._element=Object(zt.append)(e,Object(zt.$)(".monaco-dropdown")),i._label=Object(zt.append)(i._element,Object(zt.$)(".dropdown-label"));var o=r.labelRenderer;o||(o=function(e){return e.textContent=r.label||"",null});for(var a=0,s=[zt.EventType.CLICK,zt.EventType.MOUSE_DOWN,tn.a.Tap];a1||(i.visible?i.hide():i.show())})))}i._register(Object(zt.addDisposableListener)(i._label,zt.EventType.KEY_UP,(function(e){var t=new Ds.a(e);(t.equals(3)||t.equals(10))&&(zt.EventHelper.stop(e,!0),i.visible?i.hide():i.show())})));var h=o(i._label);return h&&i._register(h),i._register(tn.b.addTarget(i._label)),i}return Object($.a)(n,[{key:"show",value:function(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}},{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},{key:"element",get:function(){return this._element}}]),n}(Vt.b)),As=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(Y.a)(this,n),(o=t.call(this,null,e,a)).options=a,o._onDidChangeVisibility=o._register(new en.a),o.menuActionsOrProvider=r,o.contextMenuProvider=i,o.options.actionRunner&&(o.actionRunner=o.options.actionRunner),o}return Object($.a)(n,[{key:"render",value:function(e){var t=this,n={contextMenuProvider:this.contextMenuProvider,labelRenderer:function(e){t.element=Object(zt.append)(e,Object(zt.$)("a.action-label"));var n=t.options.classNames?Object(ne.b)(t.options.classNames):[];return n.find((function(e){return"icon"===e}))||n.push("codicon"),zt.addClasses.apply(void 0,[t.element].concat(Object(ct.a)(n))),t.element.tabIndex=0,t.element.setAttribute("role","button"),t.element.setAttribute("aria-haspopup","true"),t.element.setAttribute("aria-expanded","false"),t.element.title=t._action.label||"",null},menuAsChild:this.options.menuAsChild};if(Array.isArray(this.menuActionsOrProvider)?n.actions=this.menuActionsOrProvider:n.actionProvider=this.menuActionsOrProvider,this.dropdownMenu=this._register(new Ls(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility((function(e){var n;null===(n=t.element)||void 0===n||n.setAttribute("aria-expanded","".concat(e)),t._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){var r=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return r.options.anchorAlignmentProvider()}})}}},{key:"setActionContext",value:function(e){Object(Rt.a)(Object(Mt.a)(n.prototype),"setActionContext",this).call(this,e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}}]),n}(vr.b),Is=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Rs=function(e,t){return function(n,r){t(n,r,e)}},Ms=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._subscriptions=new we.b,r._isPressed=!1,r._suppressAltKeyUp=!1,r._subscriptions.add(Object(Ns.a)(document.body,"keydown")((function(e){r.isPressed=e.altKey||(Ke.i||Ke.d)&&e.shiftKey}))),r._subscriptions.add(Object(Ns.a)(document.body,"keyup")((function(e){r.isPressed&&r._suppressAltKeyUp&&e.preventDefault(),r._suppressAltKeyUp=!1,r.isPressed=!1}))),r._subscriptions.add(Object(Ns.a)(document.body,"mouseleave")((function(e){return r.isPressed=!1}))),r._subscriptions.add(Object(Ns.a)(document.body,"blur")((function(e){return r.isPressed=!1}))),r._subscriptions.add(e.onDidContextMenu((function(){return r.isPressed=!1}))),r}return Object($.a)(n,[{key:"suppressAltKeyUp",value:function(){this._suppressAltKeyUp=!0}},{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this._subscriptions.dispose()}},{key:"isPressed",get:function(){return this._isPressed},set:function(e){this._isPressed=e,this.fire(this._isPressed)}}],[{key:"getInstance",value:function(e){return n.instance||(n.instance=new n(e)),n.instance}}]),n}(en.a);function Ps(e,t,n,r){var i=e.getActions(t);return function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){return"navigation"===e},o=Object(Ce.a)(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=Object(ke.a)(a,2),l=s[0],c=s[1];if(n&&(c=c.map((function(e){return e instanceof Ie.c&&e.alt?e.alt:e}))),i(l)){var u=Array.isArray(t)?t:t.primary;u.unshift.apply(u,Object(ct.a)(c))}else{var d=Array.isArray(t)?t:t.secondary;d.length>0&&d.push(new Vt.c),d.push.apply(d,Object(ct.a)(c))}}}catch(h){o.e(h)}finally{o.f()}}(i,n,!1,r),function(e){var t,n=new we.b,r=Object(Ce.a)(e);try{for(r.s();!(t=r.n()).done;){var i,o=Object(ke.a)(t.value,2)[1],a=Object(Ce.a)(o);try{for(a.s();!(i=a.n()).done;){var s=i.value;n.add(s)}}catch(l){a.e(l)}finally{a.f()}}}catch(l){r.e(l)}finally{r.f()}return n}(i)}var js=new Cs.a("menu-item-action-item-icon-"),Fs=new Map,Bs=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this,void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}))._action=e,a._keybindingService=r,a._notificationService=i,a._wantsAltCommand=!1,a._itemClassDispose=a._register(new we.d),a._altKey=Ms.getInstance(o),a}return Object($.a)(n,[{key:"onClick",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this._altKey.isPressed&&this._altKey.suppressAltKeyUp(),this.actionRunner.run(this._commandAction,this._context).then(void 0,(function(e){return t._notificationService.error(e)}))}},{key:"render",value:function(e){var t=this;Object(Rt.a)(Object(Mt.a)(n.prototype),"render",this).call(this,e),this._updateItemClass(this._action.item);var r=!1,i=this._altKey.isPressed,o=function(){var e=r&&i;e!==t._wantsAltCommand&&(t._wantsAltCommand=e,t.updateLabel(),t.updateTooltip(),t.updateClass())};this._action.alt&&this._register(this._altKey.event((function(e){i=e,o()}))),this._register(Object(Ns.a)(e,"mouseleave")((function(e){r=!1,o()}))),this._register(Object(Ns.a)(e,"mouseenter")((function(e){r=!0,o()})))}},{key:"updateLabel",value:function(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}},{key:"updateTooltip",value:function(){if(this.label){var e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;this.label.title=t?Object(Z.a)("titleAndKb","{0} ({1})",n,t):n}}},{key:"updateClass",value:function(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}},{key:"_updateItemClass",value:function(e){var t,n,r=this;this._itemClassDispose.value=void 0;var i=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(Ae.e.isThemeIcon(i)){var o=Ae.e.asClassName(i);this.label&&o&&(Object(zt.addClasses)(this.label,o),this._itemClassDispose.value=Object(we.h)((function(){r.label&&Object(zt.removeClasses)(r.label,o)})))}else if(i){var a;if(null===(n=i.dark)||void 0===n?void 0:n.scheme){var s=i.dark.toString();Fs.has(s)?a=Fs.get(s):(a=js.nextId(),Object(zt.createCSSRule)(".icon.".concat(a),"background-image: ".concat(Object(zt.asCSSUrl)(i.light||i.dark))),Object(zt.createCSSRule)(".vs-dark .icon.".concat(a,", .hc-black .icon.").concat(a),"background-image: ".concat(Object(zt.asCSSUrl)(i.dark))),Fs.set(s,a)),this.label&&(Object(zt.addClasses)(this.label,"icon",a),this._itemClassDispose.value=Object(we.h)((function(){r.label&&Object(zt.removeClasses)(r.label,"icon",a)})))}}}},{key:"_commandAction",get:function(){return this._wantsAltCommand&&this._action.alt||this._action}}]),n}(vr.a);Bs=Is([Rs(1,Gt.a),Rs(2,fn.a),Rs(3,Wt.a)],Bs);var Us=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;Object(Y.a)(this,n);var a=[];if(e.item.icon)if(Ae.e.isThemeIcon(e.item.icon))a.push(Ae.e.asClassName(e.item.icon));else if(null===(o=e.item.icon.dark)||void 0===o?void 0:o.scheme){var s=e.item.icon.dark.toString();if(Fs.has(s))a.push("icon",Fs.get(s));else{var l=js.nextId();a.push("icon",l),Object(zt.createCSSRule)(".icon.".concat(l),"background-image: ".concat(Object(zt.asCSSUrl)(e.item.icon.light||e.item.icon.dark))),Object(zt.createCSSRule)(".vs-dark .icon.".concat(l,", .hc-black .icon.").concat(l),"background-image: ".concat(Object(zt.asCSSUrl)(e.item.icon.dark))),Fs.set(s,l)}}return t.call(this,e,e.actions,i,{classNames:a})}return n}(As);Us=Is([Rs(1,fn.a),Rs(2,Wt.a)],Us);var Hs,zs,Vs=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ws=function(e,t){return function(n,r){t(n,r,e)}},Gs=Object(Ht.c)("IPeekViewService");Object(Hn.b)(Gs,function(){function e(){Object(Y.a)(this,e),this._widgets=new Map}return Object($.a)(e,[{key:"addExclusiveWidget",value:function(e,t){var n=this,r=this._widgets.get(e);r&&(r.listener.dispose(),r.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((function(){var r=n._widgets.get(e);r&&r.widget===t&&(r.listener.dispose(),n._widgets.delete(e))}))})}}]),e}()),(zs=Hs||(Hs={})).inPeekEditor=new te.c("inReferenceSearchEditor",!0),zs.notInPeekEditor=zs.inPeekEditor.toNegated();var qs=function(){function e(t,n){Object(Y.a)(this,e),t instanceof Ss&&Hs.inPeekEditor.bindTo(n)}return Object($.a)(e,[{key:"dispose",value:function(){}}]),e}();qs.ID="editor.contrib.referenceController",qs=Vs([Ws(1,te.b)],qs),Object(Q.m)(qs.ID,qs);var Ks={headerBackgroundColor:nr.a.white,primaryHeadingColor:nr.a.fromHex("#333333"),secondaryHeadingColor:nr.a.fromHex("#6c6c6cb3")},Ys=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this,e,r)).instantiationService=i,o._onDidClose=new en.a,o.onDidClose=o._onDidClose.event,vs.g(o.options,Ks,!1),o}return Object($.a)(n,[{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this._onDidClose.fire(this)}},{key:"style",value:function(e){var t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),Object(Rt.a)(Object(Mt.a)(n.prototype),"style",this).call(this,e)}},{key:"_applyStyles",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"_applyStyles",this).call(this);var e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}},{key:"_fillContainer",value:function(e){this.setCssClass("peekview-widget"),this._headElement=zt.$(".head"),this._bodyElement=zt.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}},{key:"_fillHead",value:function(e,t){var n=this,r=zt.$(".peekview-title");zt.append(this._headElement,r),zt.addStandardDisposableListener(r,"click",(function(e){return n._onTitleClick(e)})),this._fillTitleIcon(r),this._primaryHeading=zt.$("span.filename"),this._secondaryHeading=zt.$("span.dirname"),this._metaHeading=zt.$("span.meta"),zt.append(r,this._primaryHeading,this._secondaryHeading,this._metaHeading);var i=zt.$(".peekview-actions");zt.append(this._headElement,i);var o=this._getActionBarOptions();this._actionbarWidget=new ms.a(i,o),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Vt.a("peekview.close",Z.a("label.close","Close"),re.a.close.classNames,!0,(function(){return n.dispose(),Promise.resolve()})),{label:!1,icon:!0})}},{key:"_fillTitleIcon",value:function(e){}},{key:"_getActionBarOptions",value:function(){var e=this;return{actionViewItemProvider:function(t){return t instanceof Ie.c?e.instantiationService.createInstance(Bs,t):t instanceof Ie.e?e.instantiationService.createInstance(Us,t):void 0}}}},{key:"_onTitleClick",value:function(e){}},{key:"setTitle",value:function(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("aria-label",e),t?this._secondaryHeading.innerText=t:zt.clearNode(this._secondaryHeading))}},{key:"setMetaTitle",value:function(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,zt.show(this._metaHeading)):zt.hide(this._metaHeading))}},{key:"_doLayout",value:function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getOption(51)),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}}},{key:"_doLayoutHead",value:function(e,t){this._headElement&&(this._headElement.style.height="".concat(e,"px"),this._headElement.style.lineHeight=this._headElement.style.height)}},{key:"_doLayoutBody",value:function(e,t){this._bodyElement&&(this._bodyElement.style.height="".concat(e,"px"))}}]),n}(xs);Ys=Vs([Ws(2,Ht.a)],Ys);var $s=Object(Le.gc)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},Z.a("peekViewTitleBackground","Background color of the peek view title area.")),Qs=Object(Le.gc)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},Z.a("peekViewTitleForeground","Color of the peek view title.")),Zs=Object(Le.gc)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},Z.a("peekViewTitleInfoForeground","Color of the peek view title info.")),Xs=Object(Le.gc)("peekView.border",{dark:"#007acc",light:"#007acc",hc:Le.h},Z.a("peekViewBorder","Color of the peek view borders and arrow.")),Js=Object(Le.gc)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:nr.a.black},Z.a("peekViewResultsBackground","Background color of the peek view result list.")),el=Object(Le.gc)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:nr.a.white},Z.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),tl=Object(Le.gc)("peekViewResult.fileForeground",{dark:nr.a.white,light:"#1E1E1E",hc:nr.a.white},Z.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),nl=Object(Le.gc)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},Z.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),rl=Object(Le.gc)("peekViewResult.selectionForeground",{dark:nr.a.white,light:"#6C6C6C",hc:nr.a.white},Z.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),il=Object(Le.gc)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:nr.a.black},Z.a("peekViewEditorBackground","Background color of the peek view editor.")),ol=Object(Le.gc)("peekViewEditorGutter.background",{dark:il,light:il,hc:il},Z.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),al=Object(Le.gc)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},Z.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),sl=Object(Le.gc)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},Z.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),ll=Object(Le.gc)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Le.b},Z.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor.")),cl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},ul=function(){function e(t,n,r,i,o){Object(Y.a)(this,e),this.isProviderFirst=t,this.parent=n,this.uri=r,this._range=i,this._rangeCallback=o,this.id=Cs.b.nextId()}return Object($.a)(e,[{key:"range",get:function(){return this._range},set:function(e){this._range=e,this._rangeCallback(this)}},{key:"ariaMessage",get:function(){return Object(Z.a)("aria.oneReference","symbol in {0} on line {1} at column {2}",Object(gn.b)(this.uri),this.range.startLineNumber,this.range.startColumn)}}]),e}(),dl=function(){function e(t){Object(Y.a)(this,e),this._modelReference=t}return Object($.a)(e,[{key:"dispose",value:function(){this._modelReference.dispose()}},{key:"preview",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=this._modelReference.object.textEditorModel;if(n){var r=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,a=e.endColumn,s=n.getWordUntilPosition({lineNumber:r,column:i-t}),l=new Te.a(r,s.startColumn,r,i),c=new Te.a(o,a,o,1073741824),u=n.getValueInRange(l).replace(/^\s+/,""),d=n.getValueInRange(e),h=n.getValueInRange(c).replace(/\s+$/,"");return{value:u+d+h,highlight:{start:u.length,end:u.length+d.length}}}}}]),e}(),hl=function(){function e(t,n){Object(Y.a)(this,e),this.parent=t,this.uri=n,this.children=[],this._previews=new zn.b}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this._previews.values()),this._previews.clear()}},{key:"getPreview",value:function(e){return this._previews.get(e.uri)}},{key:"resolve",value:function(e){return cl(this,void 0,void 0,G.a.mark((function t(){var n,r,i,o;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===this._previews.size){t.next=2;break}return t.abrupt("return",this);case 2:n=Object(Ce.a)(this.children),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=21;break}if(i=r.value,!this._previews.has(i.uri)){t.next=9;break}return t.abrupt("continue",19);case 9:return t.prev=9,t.next=12,e.createModelReference(i.uri);case 12:o=t.sent,this._previews.set(i.uri,new dl(o)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),Object(ie.e)(t.t0);case 19:t.next=5;break;case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(3),n.e(t.t1);case 26:return t.prev=26,n.f(),t.finish(26);case 29:return t.abrupt("return",this);case 30:case"end":return t.stop()}}),t,this,[[3,23,26,29],[9,16]])})))}},{key:"ariaMessage",get:function(){var e=this.children.length;return 1===e?Object(Z.a)("aria.fileReferences.1","1 symbol in {0}, full path {1}",Object(gn.b)(this.uri),this.uri.fsPath):Object(Z.a)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Object(gn.b)(this.uri),this.uri.fsPath)}}]),e}(),fl=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._disposables=new we.b,this.groups=[],this.references=[],this._onDidChangeReferenceRange=new en.a,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=t,this._title=n;var i,o=Object(ke.a)(t,1)[0];t.sort(e._compareReferences);var a,s=Object(Ce.a)(t);try{for(s.s();!(a=s.n()).done;){var l=a.value;if(i&&gn.e.isEqual(i.uri,l.uri,!0)||(i=new hl(this,l.uri),this.groups.push(i)),0===i.children.length||0!==e._compareReferences(l,i.children[i.children.length-1])){var c=new ul(o===l,i,l.uri,l.targetSelectionRange||l.range,(function(e){return r._onDidChangeReferenceRange.fire(e)}));this.references.push(c),i.children.push(c)}}}catch(u){s.e(u)}finally{s.f()}}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this.groups),this._disposables.dispose(),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}},{key:"clone",value:function(){return new e(this._links,this._title)}},{key:"nextOrPreviousReference",value:function(e,t){var n=e.parent,r=n.children.indexOf(e),i=n.children.length,o=n.parent.groups.length;return 1===o||t&&r+10?(r=t?(r+1)%i:(r+i-1)%i,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%o,n.parent.groups[r].children[0]):(r=(r+o-1)%o,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}},{key:"nearestReference",value:function(e,t){var n=this.references.map((function(n,r){return{idx:r,prefixLen:ht.d(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(n)return this.references[n.idx]}},{key:"referenceAt",value:function(e,t){var n,r=Object(Ce.a)(this.references);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.uri.toString()===e.toString()&&Te.a.containsPosition(i.range,t))return i}}catch(o){r.e(o)}finally{r.f()}}},{key:"firstReference",value:function(){var e,t=Object(Ce.a)(this.references);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.isProviderFirst)return n}}catch(r){t.e(r)}finally{t.f()}return this.references[0]}},{key:"title",get:function(){return this._title}},{key:"isEmpty",get:function(){return 0===this.groups.length}},{key:"ariaMessage",get:function(){return this.isEmpty?Object(Z.a)("aria.result.0","No results found"):1===this.references.length?Object(Z.a)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?Object(Z.a)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):Object(Z.a)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}}],[{key:"_compareReferences",value:function(e,t){return gn.e.compare(e.uri,t.uri)||Te.a.compareRangesUsingStarts(e.range,t.range)}}]),e}(),pl=(n(496),n(53)),gl=n(213),ml=n(238),vl=n(187),_l=n(97),bl=n(64);function yl(e,t,n){if("string"===typeof e&&(e=gt.a.file(e)),n){var r=n.getWorkspaceFolder(e);if(r){var i,o=n.getWorkspace().folders.length>1;if(i=Object(gn.f)(r.uri,e)?"":Object(gn.j)(r.uri,e),o){var a=r.name?r.name:Object(gn.b)(r.uri);i=i?a+" \u2022 "+i:a}return i}}if(e.scheme!==pl.b.file&&e.scheme!==pl.b.untitled)return e.with({query:null,fragment:null}).toString(!0);if(Cl(e.fsPath))return Object(bl.d)(kl(e.fsPath));var s=Object(bl.d)(e.fsPath);return!Ke.i&&(null===t||void 0===t?void 0:t.userHome)&&(s=function(e,t){if(Ke.i||!e||!t)return e;var n=El.original===t?El.normalized:void 0;n||(n="".concat(Object(ht.Q)(t,bl.e.sep)).concat(bl.e.sep),El={original:t,normalized:n});(Ke.d?e.startsWith(n):Object(ht.T)(e,n))&&(e="~/".concat(e.substr(n.length)));return e}(s,t.userHome.fsPath)),s}function Sl(e){if(e){"string"===typeof e&&(e=gt.a.file(e));var t=Object(gn.b)(e)||(e.scheme===pl.b.file?e.fsPath:e.path);return Cl(t)?kl(t):t}}function Cl(e){return!(!Ke.i||!e||":"!==e[1])}function kl(e){return Cl(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var El=Object.create(null);var wl=n(79),Ol=n(178),Tl=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},xl=function(e,t){return function(n,r){t(n,r,e)}},Nl=function(){function e(t){Object(Y.a)(this,e),this._resolverService=t}return Object($.a)(e,[{key:"hasChildren",value:function(e){return e instanceof fl||e instanceof hl}},{key:"getChildren",value:function(e){if(e instanceof fl)return e.groups;if(e instanceof hl)return e.resolve(this._resolverService).then((function(e){return e.children}));throw new Error("bad tree")}}]),e}();Nl=Tl([xl(0,as.a)],Nl);var Dl=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"getHeight",value:function(){return 23}},{key:"getTemplateId",value:function(e){return e instanceof hl?Rl.id:Pl.id}}]),e}(),Ll=function(){function e(t){Object(Y.a)(this,e),this._keybindingService=t}return Object($.a)(e,[{key:"getKeyboardNavigationLabel",value:function(e){var t;if(e instanceof ul){var n=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(n)return n.value}return Object(gn.b)(e.uri)}}]),e}();Ll=Tl([xl(0,Gt.a)],Ll);var Al=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"getId",value:function(e){return e instanceof ul?e.id:e.uri}}]),e}(),Il=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;Object(Y.a)(this,n),(o=t.call(this))._uriLabel=r;var a=document.createElement("div");return a.classList.add("reference-file"),o.file=o._register(new gl.a(a,{supportHighlights:!0})),o.badge=new ml.a(zt.append(a,zt.$(".count"))),o._register(Object(_l.a)(o.badge,i)),e.appendChild(a),o}return Object($.a)(n,[{key:"set",value:function(e,t){var n=Object(gn.d)(e.uri);this.file.setLabel(Sl(e.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});var r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(Object(Z.a)("referencesCount","{0} references",r)):this.badge.setTitleFormat(Object(Z.a)("referenceCount","{0} reference",r))}}]),n}(we.a);Il=Tl([xl(1,vl.a),xl(2,Ae.c)],Il);var Rl=function(){function e(t){Object(Y.a)(this,e),this._instantiationService=t,this.templateId=e.id}return Object($.a)(e,[{key:"renderTemplate",value:function(e){return this._instantiationService.createInstance(Il,e)}},{key:"renderElement",value:function(e,t,n){n.set(e.element,Object(wl.c)(e.filterData))}},{key:"disposeTemplate",value:function(e){e.dispose()}}]),e}();Rl.id="FileReferencesRenderer",Rl=Tl([xl(0,Ht.a)],Rl);var Ml=function(){function e(t){Object(Y.a)(this,e),this.label=new Ol.a(t,!1)}return Object($.a)(e,[{key:"set",value:function(e,t){var n,r=null===(n=e.parent.getPreview(e))||void 0===n?void 0:n.preview(e.range);if(r&&r.value){var i=r.value,o=r.highlight;t&&!wl.a.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(i,Object(wl.c)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(i,[o]))}else this.label.set("".concat(Object(gn.b)(e.uri),":").concat(e.range.startLineNumber+1,":").concat(e.range.startColumn+1))}}]),e}(),Pl=function(){function e(){Object(Y.a)(this,e),this.templateId=e.id}return Object($.a)(e,[{key:"renderTemplate",value:function(e){return new Ml(e)}},{key:"renderElement",value:function(e,t,n){n.set(e.element,e.filterData)}},{key:"disposeTemplate",value:function(){}}]),e}();Pl.id="OneReferenceRenderer";var jl,Fl,Bl=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"getWidgetAriaLabel",value:function(){return Object(Z.a)("treeAriaLabel","References")}},{key:"getAriaLabel",value:function(e){return e.ariaMessage}}]),e}(),Ul=n(148),Hl=(n(497),{separatorBorder:nr.a.transparent}),zl=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.container=t,this.view=n,this.disposable=i,this._cachedVisibleSize=void 0,"number"===typeof r?(this._size=r,this._cachedVisibleSize=void 0,zt.addClass(t,"visible")):(this._size=0,this._cachedVisibleSize=r.cachedVisibleSize)}return Object($.a)(e,[{key:"setVisible",value:function(e,t){e!==this.visible&&(e?(this.size=Object(ss.b)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),zt.toggleClass(this.container,"visible",e),this.view.setVisible&&this.view.setVisible(e))}},{key:"layout",value:function(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}},{key:"dispose",value:function(){return this.disposable.dispose(),this.view}},{key:"size",set:function(e){this._size=e},get:function(){return this._size}},{key:"visible",get:function(){return"undefined"===typeof this._cachedVisibleSize}},{key:"minimumSize",get:function(){return this.visible?this.view.minimumSize:0}},{key:"viewMinimumSize",get:function(){return this.view.minimumSize}},{key:"maximumSize",get:function(){return this.visible?this.view.maximumSize:0}},{key:"viewMaximumSize",get:function(){return this.view.maximumSize}},{key:"priority",get:function(){return this.view.priority}},{key:"snap",get:function(){return!!this.view.snap}},{key:"enabled",set:function(e){this.container.style.pointerEvents=e?"":"none"}}]),e}(),Vl=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"layoutContainer",value:function(e){this.container.style.top="".concat(e,"px"),this.container.style.height="".concat(this.size,"px")}}]),n}(zl),Wl=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"layoutContainer",value:function(e){this.container.style.left="".concat(e,"px"),this.container.style.width="".concat(this.size,"px")}}]),n}(zl);!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(jl||(jl={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(Fl||(Fl={}));var Gl=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(Y.a)(this,n),(r=t.call(this)).size=0,r.contentSize=0,r.proportions=void 0,r.viewItems=[],r.sashItems=[],r.state=jl.Idle,r._onDidSashChange=r._register(new en.a),r.onDidSashChange=r._onDidSashChange.event,r._onDidSashReset=r._register(new en.a),r._startSnappingEnabled=!0,r._endSnappingEnabled=!0,r.orientation=Uo.k(i.orientation)?0:i.orientation,r.inverseAltBehavior=!!i.inverseAltBehavior,r.proportionalLayout=!!Uo.k(i.proportionalLayout)||!!i.proportionalLayout,r.el=document.createElement("div"),zt.addClass(r.el,"monaco-split-view2"),zt.addClass(r.el,0===r.orientation?"vertical":"horizontal"),e.appendChild(r.el),r.sashContainer=zt.append(r.el,zt.$(".sash-container")),r.viewContainer=zt.append(r.el,zt.$(".split-view-container")),r.style(i.styles||Hl),i.descriptor&&(r.size=i.descriptor.size,i.descriptor.views.forEach((function(e,t){var n=Uo.k(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},i=e.view;r.doAddView(i,n,t,!0)})),r.contentSize=r.viewItems.reduce((function(e,t){return e+t.size}),0),r.saveProportions()),r}return Object($.a)(n,[{key:"style",value:function(e){e.separatorBorder.isTransparent()?(zt.removeClass(this.el,"separator-border"),this.el.style.removeProperty("--separator-border")):(zt.addClass(this.el,"separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}},{key:"addView",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.length,r=arguments.length>3?arguments[3]:void 0;this.doAddView(e,t,n,r)}},{key:"layout",value:function(e,t){var n=this,r=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(var i=0;i0&&(this.proportions=this.viewItems.map((function(t){return t.size/e.contentSize})))}},{key:"onSashStart",value:function(e){var t,n=this,r=e.sash,i=e.start,o=e.alt,a=Object(Ce.a)(this.viewItems);try{for(a.s();!(t=a.n()).done;){t.value.enabled=!1}}catch(u){a.e(u)}finally{a.f()}var s=Object(ne.j)(this.sashItems,(function(e){return e.sash===r})),l=Object(we.e)(Object(Ns.a)(document.body,"keydown")((function(e){return c(n.sashDragState.current,e.altKey)})),Object(Ns.a)(document.body,"keyup")((function(){return c(n.sashDragState.current,!1)}))),c=function(e,t){var r,i,o=n.viewItems.map((function(e){return e.size})),a=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(n.inverseAltBehavior&&(t=!t),t)if(s===n.sashItems.length-1){var u=n.viewItems[s];a=(u.minimumSize-u.size)/2,c=(u.maximumSize-u.size)/2}else{var d=n.viewItems[s+1];a=(d.size-d.maximumSize)/2,c=(d.size-d.minimumSize)/2}if(!t){var h=Object(ne.s)(s,-1),f=Object(ne.s)(s+1,n.viewItems.length),p=h.reduce((function(e,t){return e+(n.viewItems[t].minimumSize-o[t])}),0),g=h.reduce((function(e,t){return e+(n.viewItems[t].viewMaximumSize-o[t])}),0),m=0===f.length?Number.POSITIVE_INFINITY:f.reduce((function(e,t){return e+(o[t]-n.viewItems[t].minimumSize)}),0),v=0===f.length?Number.NEGATIVE_INFINITY:f.reduce((function(e,t){return e+(o[t]-n.viewItems[t].viewMaximumSize)}),0),_=Math.max(p,v),b=Math.min(m,g),y=n.findFirstSnapIndex(h),S=n.findFirstSnapIndex(f);if("number"===typeof y){var C=n.viewItems[y],k=Math.floor(C.viewMinimumSize/2);r={index:y,limitDelta:C.visible?_-k:_+k,size:C.size}}if("number"===typeof S){var E=n.viewItems[S],w=Math.floor(E.viewMinimumSize/2);i={index:S,limitDelta:E.visible?b+w:b-w,size:E.size}}}n.sashDragState={start:e,current:e,index:s,sizes:o,minDelta:a,maxDelta:c,alt:t,snapBefore:r,snapAfter:i,disposable:l}};c(i,o)}},{key:"onSashChange",value:function(e){var t=e.current,n=this.sashDragState,r=n.index,i=n.start,o=n.sizes,a=n.alt,s=n.minDelta,l=n.maxDelta,c=n.snapBefore,u=n.snapAfter;this.sashDragState.current=t;var d=t-i,h=this.resize(r,d,o,void 0,void 0,s,l,c,u);if(a){var f=r===this.sashItems.length-1,p=this.viewItems.map((function(e){return e.size})),g=f?r:r+1,m=this.viewItems[g],v=m.size-m.maximumSize,_=m.size-m.minimumSize,b=f?r-1:r+1;this.resize(b,-h,p,void 0,void 0,v,_)}this.distributeEmptySpace(),this.layoutViews()}},{key:"onSashEnd",value:function(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();var t,n=Object(Ce.a)(this.viewItems);try{for(n.s();!(t=n.n()).done;){t.value.enabled=!0}}catch(r){n.e(r)}finally{n.f()}}},{key:"onViewChange",value:function(e,t){var n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=Object(ss.b)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&n>0?(this.resize(n-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([n],void 0)))}},{key:"resizeView",value:function(e,t){var n=this;if(this.state!==jl.Idle)throw new Error("Cant modify splitview");if(this.state=jl.Busy,!(e<0||e>=this.viewItems.length)){var r=Object(ne.s)(this.viewItems.length).filter((function(t){return t!==e})),i=[].concat(Object(ct.a)(r.filter((function(e){return 1===n.viewItems[e].priority}))),[e]),o=r.filter((function(e){return 2===n.viewItems[e].priority})),a=this.viewItems[e];t=Math.round(t),t=Object(ss.b)(t,a.minimumSize,Math.min(a.maximumSize,this.size)),a.size=t,this.relayout(i,o),this.state=jl.Idle}}},{key:"distributeViewSizes",value:function(){var e,t=this,n=[],r=0,i=Object(Ce.a)(this.viewItems);try{for(i.s();!(e=i.n()).done;){var o=e.value;o.maximumSize-o.minimumSize>0&&(n.push(o),r+=o.size)}}catch(f){i.e(f)}finally{i.f()}for(var a=Math.floor(r/n.length),s=0,l=n;s=this.viewItems.length?-1:this.viewItems[e].size}},{key:"doAddView",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.length,i=arguments.length>3?arguments[3]:void 0;if(this.state!==jl.Idle)throw new Error("Cant modify splitview");this.state=jl.Busy;var o=zt.$(".split-view-view");r===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(r));var a,s=e.onDidChange((function(e){return n.onViewChange(d,e)})),l=Object(we.h)((function(){return n.viewContainer.removeChild(o)})),c=Object(we.e)(s,l);a="number"===typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;var u,d=0===this.orientation?new Vl(o,e,a,c):new Wl(o,e,a,c);if(this.viewItems.splice(r,0,d),this.viewItems.length>1){var h=0===this.orientation?new ki.a(this.sashContainer,{getHorizontalSashTop:function(e){return n.getSashPosition(e)}},{orientation:1,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}):new ki.a(this.sashContainer,{getVerticalSashLeft:function(e){return n.getSashPosition(e)}},{orientation:0,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),f=0===this.orientation?function(e){return{sash:h,start:e.startY,current:e.currentY,alt:e.altKey}}:function(e){return{sash:h,start:e.startX,current:e.currentX,alt:e.altKey}},p=en.b.map(h.onDidStart,f),g=p(this.onSashStart,this),m=en.b.map(h.onDidChange,f),v=m(this.onSashChange,this),_=en.b.map(h.onDidEnd,(function(){return Object(ne.j)(n.sashItems,(function(e){return e.sash===h}))})),b=_(this.onSashEnd,this),y=h.onDidReset((function(){var e=Object(ne.j)(n.sashItems,(function(e){return e.sash===h})),t=Object(ne.s)(e,-1),r=Object(ne.s)(e+1,n.viewItems.length),i=n.findFirstSnapIndex(t),o=n.findFirstSnapIndex(r);("number"!==typeof i||n.viewItems[i].visible)&&("number"!==typeof o||n.viewItems[o].visible)&&n._onDidSashReset.fire(e)})),S=Object(we.e)(g,v,b,y,h),C={sash:h,disposable:S};this.sashItems.splice(r-1,0,C)}o.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(u=[t.index]),i||this.relayout([r],u),this.state=jl.Idle,i||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}},{key:"relayout",value:function(e,t){var n=this.viewItems.reduce((function(e,t){return e+t.size}),0);this.resize(this.viewItems.length-1,this.size-n,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}},{key:"resize",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.map((function(e){return e.size})),i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Number.NEGATIVE_INFINITY,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Number.POSITIVE_INFINITY,l=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0;if(e<0||e>=this.viewItems.length)return 0;var u=Object(ne.s)(e,-1),d=Object(ne.s)(e+1,this.viewItems.length);if(o){var h,f=Object(Ce.a)(o);try{for(f.s();!(h=f.n()).done;){var p=h.value;Object(ne.r)(u,p),Object(ne.r)(d,p)}}catch(V){f.e(V)}finally{f.f()}}if(i){var g,m=Object(Ce.a)(i);try{for(m.s();!(g=m.n()).done;){var v=g.value;Object(ne.q)(u,v),Object(ne.q)(d,v)}}catch(V){m.e(V)}finally{m.f()}}var _=u.map((function(e){return n.viewItems[e]})),b=u.map((function(e){return r[e]})),y=d.map((function(e){return n.viewItems[e]})),S=d.map((function(e){return r[e]})),C=u.reduce((function(e,t){return e+(n.viewItems[t].minimumSize-r[t])}),0),k=u.reduce((function(e,t){return e+(n.viewItems[t].maximumSize-r[t])}),0),E=0===d.length?Number.POSITIVE_INFINITY:d.reduce((function(e,t){return e+(r[t]-n.viewItems[t].minimumSize)}),0),w=0===d.length?Number.NEGATIVE_INFINITY:d.reduce((function(e,t){return e+(r[t]-n.viewItems[t].maximumSize)}),0),O=Math.max(C,w,a),T=Math.min(E,k,s),x=!1;if(l){var N=this.viewItems[l.index],D=t>=l.limitDelta;x=D!==N.visible,N.setVisible(D,l.size)}if(!x&&c){var L=this.viewItems[c.index],A=t0||e}));e=!1;var n=this.viewItems.map((function(t){return e=t.maximumSize-t.size>0||e})),r=Object(ct.a)(this.viewItems).reverse();e=!1;var i=r.map((function(t){return e=t.size-t.minimumSize>0||e})).reverse();e=!1;for(var o=r.map((function(t){return e=t.maximumSize-t.size>0||e})).reverse(),a=0,s=0;s0||this.startSnappingEnabled)?l.state=1:m&&t[s]&&(a0)return;if(!l.visible&&l.snap)return s}}catch(c){a.e(c)}finally{a.f()}}},{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this.viewItems.forEach((function(e){return e.dispose()})),this.viewItems=[],this.sashItems.forEach((function(e){return e.disposable.dispose()})),this.sashItems=[]}},{key:"orthogonalStartSash",get:function(){return this._orthogonalStartSash},set:function(e){var t,n=Object(Ce.a)(this.sashItems);try{for(n.s();!(t=n.n()).done;){t.value.sash.orthogonalStartSash=e}}catch(r){n.e(r)}finally{n.f()}this._orthogonalStartSash=e}},{key:"orthogonalEndSash",get:function(){return this._orthogonalEndSash},set:function(e){var t,n=Object(Ce.a)(this.sashItems);try{for(n.s();!(t=n.n()).done;){t.value.sash.orthogonalEndSash=e}}catch(r){n.e(r)}finally{n.f()}this._orthogonalEndSash=e}},{key:"startSnappingEnabled",get:function(){return this._startSnappingEnabled},set:function(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}},{key:"endSnappingEnabled",get:function(){return this._endSnappingEnabled},set:function(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}}]),n}(we.a),ql=n(167),Kl=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Yl=function(e,t){return function(n,r){t(n,r,e)}},$l=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Ql=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._editor=t,this._model=n,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new we.b,this._callOnModelChange=new we.b,this._callOnDispose.add(this._editor.onDidChangeModel((function(){return r._onModelChanged()}))),this._onModelChanged()}return Object($.a)(e,[{key:"dispose",value:function(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}},{key:"_onModelChanged",value:function(){this._callOnModelChange.clear();var e=this._editor.getModel();if(e){var t,n=Object(Ce.a)(this._model.references);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.uri.toString()===e.uri.toString())return void this._addDecorations(r.parent)}}catch(i){n.e(i)}finally{n.f()}}}},{key:"_addDecorations",value:function(t){var n=this;if(this._editor.hasModel()){this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((function(){return n._onDecorationChanged()})));for(var r=[],i=[],o=0,a=t.children.length;o0?t.children[0]:void 0}},{key:"revealReference",value:function(e){return $l(this,void 0,void 0,G.a.mark((function t(){return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._revealReference(e,!1);case 2:this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"});case 3:case"end":return t.stop()}}),t,this)})))}},{key:"_revealReference",value:function(e,t){return $l(this,void 0,void 0,G.a.mark((function n(){var r,i,o,a,s;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this._revealedReference!==e){n.next=2;break}return n.abrupt("return");case 2:if(this._revealedReference=e,e.uri.scheme!==pl.b.inMemory?this.setTitle(Object(gn.c)(e.uri),this._uriLabel.getUriLabel(Object(gn.d)(e.uri))):this.setTitle(Z.a("peekView.alternateTitle","References")),r=this._textModelResolverService.createModelReference(e.uri),this._tree.getInput()!==e.parent){n.next=9;break}this._tree.reveal(e),n.next=13;break;case 9:return t&&this._tree.reveal(e.parent),n.next=12,this._tree.expand(e.parent);case 12:this._tree.reveal(e);case 13:return n.next=15,r;case 15:if(i=n.sent,this._model){n.next=19;break}return i.dispose(),n.abrupt("return");case 19:Object(we.f)(this._previewModelReference),(o=i.object)?(a=this._preview.getModel()===o.textEditorModel?0:1,s=Te.a.lift(e.range).collapseToStart(),this._previewModelReference=i,this._preview.setModel(o.textEditorModel),this._preview.setSelection(s),this._preview.revealRangeInCenter(s,a)):(this._preview.setModel(this._previewNotAvailableMessage),i.dispose());case 22:case"end":return n.stop()}}),n,this)})))}}]),n}(Ys);Jl=Kl([Yl(3,Ae.c),Yl(4,as.a),Yl(5,Ht.a),Yl(6,Gs),Yl(7,vl.a),Yl(8,ql.a),Yl(9,Gt.a)],Jl),Object(Ae.g)((function(e,t){var n=e.getColor(al);n&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ".concat(n,"; }"));var r=e.getColor(sl);r&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ".concat(r,"; }"));var i=e.getColor(ll);i&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ".concat(i,"; box-sizing: border-box; }"));var o=e.getColor(Le.b);o&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ".concat(o,"; box-sizing: border-box; }"));var a=e.getColor(Js);a&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: ".concat(a,"; }"));var s=e.getColor(el);s&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: ".concat(s,"; }"));var l=e.getColor(tl);l&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ".concat(l,"; }"));var c=e.getColor(nl);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ".concat(c,"; }"));var u=e.getColor(rl);u&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ".concat(u," !important; }"));var d=e.getColor(il);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {"+"\tbackground-color: ".concat(d,";")+"}");var h=e.getColor(ol);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {"+"\tbackground-color: ".concat(h,";")+"}")}));var ec=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},tc=function(e,t){return function(n,r){t(n,r,e)}},nc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},rc=new te.c("referenceSearchVisible",!1),ic=function(){function e(t,n,r,i,o,a,s,l){Object(Y.a)(this,e),this._defaultTreeKeyboardSupport=t,this._editor=n,this._editorService=i,this._notificationService=o,this._instantiationService=a,this._storageService=s,this._configurationService=l,this._disposables=new we.b,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=rc.bindTo(r)}return Object($.a)(e,[{key:"dispose",value:function(){this._referenceSearchVisible.reset(),this._disposables.dispose(),Object(we.f)(this._widget),Object(we.f)(this._model),this._widget=void 0,this._model=void 0}},{key:"toggleWidget",value:function(e,t,n){var r,i=this;if(this._widget&&(r=this._widget.position),this.closeWidget(),!r||!e.containsPosition(r)){this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((function(){i.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((function(){i._ignoreModelChangeEvent||i.closeWidget()})));var o="peekViewLayout",a=Zl.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(Jl,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(Z.a("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((function(){t.cancel(),i._widget&&(i._storageService.store(o,JSON.stringify(i._widget.layoutData),0),i._widget=void 0),i.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((function(e){var t=e.element,r=e.kind;if(t)switch(r){case"open":"editor"===e.source&&i._configurationService.getValue("editor.stablePeek")||i.openReference(t,!1);break;case"side":i.openReference(t,!0);break;case"goto":n?i._gotoReference(t):i.openReference(t,!1)}})));var s=++this._requestIdPool;t.then((function(t){if(s===i._requestIdPool&&i._widget)return i._model&&i._model.dispose(),i._model=t,i._widget.setModel(i._model).then((function(){if(i._widget&&i._model&&i._editor.hasModel()){i._model.isEmpty?i._widget.setMetaTitle(""):i._widget.setMetaTitle(Z.a("metaTitle.N","{0} ({1})",i._model.title,i._model.references.length));var t=i._editor.getModel().uri,n=new Oe.a(e.startLineNumber,e.startColumn),r=i._model.nearestReference(t,n);if(r)return i._widget.setSelection(r).then((function(){i._widget&&"editor"===i._editor.getOption(68)&&i._widget.focusOnPreviewEditor()}))}}))}),(function(e){i._notificationService.error(e)}))}}},{key:"changeFocusBetweenPreviewAndReferences",value:function(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}},{key:"goToNextOrPreviousReference",value:function(e){return nc(this,void 0,void 0,G.a.mark((function t(){var n,r,i,o,a;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()&&this._model&&this._widget){t.next=2;break}return t.abrupt("return");case 2:if(n=this._widget.position){t.next=5;break}return t.abrupt("return");case 5:if(r=this._model.nearestReference(this._editor.getModel().uri,n)){t.next=8;break}return t.abrupt("return");case 8:return i=this._model.nextOrPreviousReference(r,e),o=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused(),t.next=13,this._widget.setSelection(i);case 13:return t.next=15,this._gotoReference(i);case 15:o?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor();case 16:case"end":return t.stop()}}),t,this)})))}},{key:"revealReference",value:function(e){return nc(this,void 0,void 0,G.a.mark((function t(){return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()&&this._model&&this._widget){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this._widget.revealReference(e);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"closeWidget",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Object(we.f)(this._widget),Object(we.f)(this._model),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}},{key:"_gotoReference",value:function(t){var n=this;this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;var r=Te.a.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:r}},this._editor).then((function(t){var i;if(n._ignoreModelChangeEvent=!1,t&&n._widget)if(n._editor===t)n._widget.show(r),n._widget.focusOnReferenceTree();else{var o=e.get(t),a=n._model.clone();n.closeWidget(),t.focus(),o.toggleWidget(r,Object(Ee.f)((function(e){return Promise.resolve(a)})),null!==(i=n._peekMode)&&void 0!==i&&i)}else n.closeWidget()}),(function(e){n._ignoreModelChangeEvent=!1,Object(ie.e)(e)}))}},{key:"openReference",value:function(e,t){t||this.closeWidget();var n=e.uri,r=e.range;this._editorService.openCodeEditor({resource:n,options:{selection:r}},this._editor,t)}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();function oc(e,t){var n=function(e){var t=e.get($e.a).getFocusedCodeEditor();return t instanceof Ss?t.getParentEditor():t}(e);if(n){var r=ic.get(n);r&&t(r)}}ic.ID="editor.contrib.referencesController",ic=ec([tc(2,te.b),tc(3,$e.a),tc(4,fn.a),tc(5,Ht.a),tc(6,Vn.a),tc(7,ir.a)],ic),Ti.a.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Object(ee.a)(2089,60),when:te.a.or(rc,Hs.inPeekEditor),handler:function(e){oc(e,(function(e){e.changeFocusBetweenPreviewAndReferences()}))}}),Ti.a.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:te.a.or(rc,Hs.inPeekEditor),handler:function(e){oc(e,(function(e){e.goToNextOrPreviousReference(!0)}))}}),Ti.a.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:te.a.or(rc,Hs.inPeekEditor),handler:function(e){oc(e,(function(e){e.goToNextOrPreviousReference(!1)}))}}),dn.a.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),dn.a.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),dn.a.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),dn.a.registerCommand("closeReferenceSearch",(function(e){return oc(e,(function(e){return e.closeWidget()}))})),Ti.a.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:te.a.and(Hs.inPeekEditor,te.a.not("config.editor.stablePeek"))}),Ti.a.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:te.a.and(rc,te.a.not("config.editor.stablePeek"))}),Ti.a.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:te.a.and(rc,Ul.e),handler:function(e){var t,n=null===(t=e.get(Ul.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof ul&&oc(e,(function(e){return e.revealReference(n[0])}))}}),Ti.a.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:te.a.and(rc,Ul.e),handler:function(e){var t,n=null===(t=e.get(Ul.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof ul&&oc(e,(function(e){return e.openReference(n[0],!0)}))}}),dn.a.registerCommand("openReference",(function(e){var t,n=null===(t=e.get(Ul.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof ul&&oc(e,(function(e){return e.openReference(n[0],!1)}))}));var ac=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function sc(e,t,n,r){var i=n.ordered(e).map((function(n){return Promise.resolve(r(n,e,t)).then(void 0,(function(e){Object(ie.f)(e)}))}));return Promise.all(i).then((function(e){var t,n=[],r=Object(Ce.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;Array.isArray(i)?n.push.apply(n,Object(ct.a)(i)):i&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}return n}))}function lc(e,t,n){return sc(e,t,vt.f,(function(e,t,r){return e.provideDefinition(t,r,n)}))}function cc(e,t,n){return sc(e,t,vt.e,(function(e,t,r){return e.provideDeclaration(t,r,n)}))}function uc(e,t,n){return sc(e,t,vt.q,(function(e,t,r){return e.provideImplementation(t,r,n)}))}function dc(e,t,n){return sc(e,t,vt.D,(function(e,t,r){return e.provideTypeDefinition(t,r,n)}))}function hc(e,t,n,r){var i=this;return sc(e,t,vt.v,(function(e,t,o){return ac(i,void 0,void 0,G.a.mark((function i(){var a,s;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.provideReferences(t,o,{includeDeclaration:!0},r);case 2:if(a=i.sent,n&&a&&2===a.length){i.next=5;break}return i.abrupt("return",a);case 5:return i.next=7,e.provideReferences(t,o,{includeDeclaration:!1},r);case 7:if(!(s=i.sent)||1!==s.length){i.next=10;break}return i.abrupt("return",s);case 10:return i.abrupt("return",a);case 11:case"end":return i.stop()}}),i)})))}))}Object(Q.p)("_executeDefinitionProvider",(function(e,t){return lc(e,t,pt.a.None)})),Object(Q.p)("_executeDeclarationProvider",(function(e,t){return cc(e,t,pt.a.None)})),Object(Q.p)("_executeImplementationProvider",(function(e,t){return uc(e,t,pt.a.None)})),Object(Q.p)("_executeTypeDefinitionProvider",(function(e,t){return dc(e,t,pt.a.None)})),Object(Q.p)("_executeReferenceProvider",(function(e,t){return hc(e,t,!1,pt.a.None)}));var fc=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},pc=function(e,t){return function(n,r){t(n,r,e)}},gc=new te.c("hasSymbols",!1),mc=Object(Ht.c)("ISymbolNavigationService"),vc=function(){function e(t,n,r,i){Object(Y.a)(this,e),this._editorService=n,this._notificationService=r,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=gc.bindTo(t)}return Object($.a)(e,[{key:"reset",value:function(){this._ctxHasSymbols.reset(),Object(we.f)(this._currentState),Object(we.f)(this._currentMessage),this._currentModel=void 0,this._currentIdx=-1}},{key:"put",value:function(e){var t=this,n=e.parent.parent;if(n.references.length<=1)this.reset();else{this._currentModel=n,this._currentIdx=n.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();var r=new _c(this._editorService),i=r.onDidChange((function(e){if(!t._ignoreEditorChange){var r=t._editorService.getActiveCodeEditor();if(r){var i=r.getModel(),o=r.getPosition();if(i&&o){var a,s=!1,l=!1,c=Object(Ce.a)(n.references);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(Object(gn.f)(u.uri,i.uri))s=!0,l=l||Te.a.containsPosition(u.range,o);else if(s)break}}catch(d){c.e(d)}finally{c.f()}s&&l||t.reset()}}}}));this._currentState=Object(we.e)(r,i)}}},{key:"revealNext",value:function(e){var t=this;if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;var n=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:n.uri,options:{selection:Te.a.collapseToStart(n.range),selectionRevealType:3}},e).finally((function(){t._ignoreEditorChange=!1}))}},{key:"_showMessage",value:function(){Object(we.f)(this._currentMessage);var e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?Object(Z.a)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):Object(Z.a)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}}]),e}();vc=fc([pc(0,te.b),pc(1,$e.a),pc(2,fn.a),pc(3,Gt.a)],vc),Object(Hn.b)(mc,vc,!0),Object(Q.l)(new(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.gotoNextSymbolFromResult",precondition:gc,kbOpts:{weight:100,primary:70}})}return Object($.a)(n,[{key:"runEditorCommand",value:function(e,t){return e.get(mc).revealNext(t)}}]),n}(Q.c))),Ti.a.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:gc,primary:9,handler:function(e){e.get(mc).reset()}});var _c=function(){function e(t){Object(Y.a)(this,e),this._listener=new Map,this._disposables=new we.b,this._onDidChange=new en.a,this.onDidChange=this._onDidChange.event,this._disposables.add(t.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(t.onCodeEditorAdd(this._onDidAddEditor,this)),t.listCodeEditors().forEach(this._onDidAddEditor,this)}return Object($.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._onDidChange.dispose(),Object(we.f)(this._listener.values())}},{key:"_onDidAddEditor",value:function(e){var t=this;this._listener.set(e,Object(we.e)(e.onDidChangeCursorPosition((function(n){return t._onDidChange.fire({editor:e})})),e.onDidChangeModelContent((function(n){return t._onDidChange.fire({editor:e})}))))}},{key:"_onDidRemoveEditor",value:function(e){Object(we.f)(this._listener.get(e)),this._listener.delete(e)}}]),e}();_c=fc([pc(0,$e.a)],_c);var bc,yc,Sc,Cc,kc,Ec,wc,Oc,Tc=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Ie.d.appendMenuItem(Ie.b.EditorContext,{submenu:Ie.b.EditorContextPeek,title:Z.a("peek.submenu","Peek"),group:"navigation",order:100});var xc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._configuration=e,i}return Object($.a)(n,[{key:"run",value:function(e,t){var n=this;if(!t.hasModel())return Promise.resolve(void 0);var r=e.get(fn.a),i=e.get($e.a),o=e.get(kt.a),a=e.get(mc),s=t.getModel(),l=t.getPosition(),c=new mt.b(t,5),u=Object(Ee.j)(this._getLocationModel(s,l,c.token),c.token).then((function(e){return Tc(n,void 0,void 0,G.a.mark((function n(){var r,o,u,d;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e&&!c.token.isCancellationRequested){n.next=2;break}return n.abrupt("return");case 2:if(Object(he.a)(e.ariaMessage),e.referenceAt(s.uri,l)&&(o=this._getAlternativeCommand(t))!==this.id&&(r=t.getAction(o)),0!==(u=e.references.length)){n.next=9;break}this._configuration.muteMessage||(d=s.getWordAtPosition(l),Ft.get(t).showMessage(this._getNoResultFoundMessage(d),l)),n.next=14;break;case 9:if(1!==u||!r){n.next=13;break}r.run(),n.next=14;break;case 13:return n.abrupt("return",this._onResult(i,a,t,e));case 14:case"end":return n.stop()}}),n,this)})))}),(function(e){r.error(e)})).finally((function(){c.dispose()}));return o.showWhile(u,250),u}},{key:"_onResult",value:function(e,t,n,r){return Tc(this,void 0,void 0,G.a.mark((function i(){var o,a,s,l;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._getGoToPreference(n),n instanceof Ss||!(this._configuration.openInPeek||"peek"===o&&r.references.length>1)){i.next=5;break}this._openInPeek(n,r),i.next=12;break;case 5:return a=r.firstReference(),s=r.references.length>1&&"gotoAndPeek"===o,i.next=9,this._openReference(n,e,a,this._configuration.openToSide,!s);case 9:l=i.sent,s&&l?this._openInPeek(l,r):r.dispose(),"goto"===o&&t.put(a);case 12:case"end":return i.stop()}}),i,this)})))}},{key:"_openReference",value:function(e,t,n,r,i){return Tc(this,void 0,void 0,G.a.mark((function o(){var a,s,l,c;return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=void 0,Object(vt.G)(n)&&(a=n.targetSelectionRange),a||(a=n.range),o.next=5,t.openCodeEditor({resource:n.uri,options:{selection:Te.a.collapseToStart(a),selectionRevealType:3}},e,r);case 5:if(s=o.sent){o.next=8;break}return o.abrupt("return",void 0);case 8:return i&&(l=s.getModel(),c=s.deltaDecorations([],[{range:a,options:{className:"symbolHighlight"}}]),setTimeout((function(){s.getModel()===l&&s.deltaDecorations(c,[])}),350)),o.abrupt("return",s);case 10:case"end":return o.stop()}}),o)})))}},{key:"_openInPeek",value:function(e,t){var n=ic.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Object(Ee.f)((function(e){return Promise.resolve(t)})),this._configuration.openInPeek):t.dispose()}}]),n}(Q.b),Nc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,lc(e,t,n);case 3:return r.t1=r.sent,r.t2=Z.a("def.title","Definitions"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Z.a("noResultWord","No definition found for '{0}'",e.word):Z.a("generic.noResults","No definition found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(43).alternativeDefinitionCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(43).multipleDefinitions}}]),n}(xc),Dc=Ke.h&&!qe.k?2118:70;Object(Q.k)(((bc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.id,label:Z.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:te.a.and(X.a.hasDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:Dc,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:Ie.b.MenubarGoMenu,group:"4_symbol_nav",order:2,title:Z.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),dn.a.registerCommandAlias("editor.action.goToDeclaration",n.id),e}return n}(Nc)).id="editor.action.revealDefinition",bc)),Object(Q.k)(((yc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!0,openInPeek:!1,muteMessage:!1},{id:n.id,label:Z.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:te.a.and(X.a.hasDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,Dc),weight:100}}),dn.a.registerCommandAlias("editor.action.openDeclarationToTheSide",n.id),e}return n}(Nc)).id="editor.action.revealDefinitionAside",yc)),Object(Q.k)(((Sc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.id,label:Z.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:te.a.and(X.a.hasDefinitionProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Ie.b.EditorContextPeek,group:"peek",order:2}}),dn.a.registerCommandAlias("editor.action.previewDeclaration",n.id),e}return n}(Nc)).id="editor.action.peekDefinition",Sc));var Lc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,cc(e,t,n);case 3:return r.t1=r.sent,r.t2=Z.a("decl.title","Declarations"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Z.a("decl.noResultWord","No declaration found for '{0}'",e.word):Z.a("decl.generic.noResults","No declaration found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(43).alternativeDeclarationCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(43).multipleDeclarations}}]),n}(xc);Object(Q.k)(((Cc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.id,label:Z.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:te.a.and(X.a.hasDeclarationProvider,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:Ie.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:Z.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}return Object($.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Z.a("decl.noResultWord","No declaration found for '{0}'",e.word):Z.a("decl.generic.noResults","No declaration found")}}]),n}(Lc)).id="editor.action.revealDeclaration",Cc)),Object(Q.k)(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:Z.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:te.a.and(X.a.hasDeclarationProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ie.b.EditorContextPeek,group:"peek",order:3}})}return n}(Lc));var Ac=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,dc(e,t,n);case 3:return r.t1=r.sent,r.t2=Z.a("typedef.title","Type Definitions"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Z.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):Z.a("goToTypeDefinition.generic.noResults","No type definition found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(43).alternativeTypeDefinitionCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(43).multipleTypeDefinitions}}]),n}(xc);Object(Q.k)(((kc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.ID,label:Z.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:te.a.and(X.a.hasTypeDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:Ie.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:Z.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}return n}(Ac)).ID="editor.action.goToTypeDefinition",kc)),Object(Q.k)(((Ec=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.ID,label:Z.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:te.a.and(X.a.hasTypeDefinitionProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ie.b.EditorContextPeek,group:"peek",order:4}})}return n}(Ac)).ID="editor.action.peekTypeDefinition",Ec));var Ic=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,uc(e,t,n);case 3:return r.t1=r.sent,r.t2=Z.a("impl.title","Implementations"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Z.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):Z.a("goToImplementation.generic.noResults","No implementation found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(43).alternativeImplementationCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(43).multipleImplementations}}]),n}(xc);Object(Q.k)(((wc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.ID,label:Z.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:te.a.and(X.a.hasImplementationProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:Ie.b.MenubarGoMenu,group:"4_symbol_nav",order:4,title:Z.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}return n}(Ic)).ID="editor.action.goToImplementation",wc)),Object(Q.k)(((Oc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.ID,label:Z.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:te.a.and(X.a.hasImplementationProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Ie.b.EditorContextPeek,group:"peek",order:5}})}return n}(Ic)).ID="editor.action.peekImplementation",Oc));var Rc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return e?Z.a("references.no","No references found for '{0}'",e.word):Z.a("references.noGeneric","No references found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(43).alternativeReferenceCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(43).multipleReferences}}]),n}(xc);Object(Q.k)(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:Z.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:te.a.and(X.a.hasReferenceProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:Ie.b.MenubarGoMenu,group:"4_symbol_nav",order:5,title:Z.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,hc(e,t,!0,n);case 3:return r.t1=r.sent,r.t2=Z.a("ref.title","References"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}}]),n}(Rc)),Object(Q.k)(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:Z.a("references.action.label","Peek References"),alias:"Peek References",precondition:te.a.and(X.a.hasReferenceProvider,Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ie.b.EditorContextPeek,group:"peek",order:6}})}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function r(){return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=fl,r.next=3,hc(e,t,!1,n);case 3:return r.t1=r.sent,r.t2=Z.a("ref.title","References"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}}]),n}(Rc));var Mc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this,e,{id:"editor.action.goToLocation",label:Z.a("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:te.a.and(Hs.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated())}))._references=r,o._gotoMultipleBehaviour=i,o}return Object($.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return Tc(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new fl(this._references,Z.a("generic.title","Locations")));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&Z.a("generic.noResult","No results for '{0}'",e.word)||""}},{key:"_getGoToPreference",value:function(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(43).multipleReferences}},{key:"_getAlternativeCommand",value:function(){return""}}]),n}(xc);dn.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:gt.a},{name:"position",description:"The position at which to start",constraint:Oe.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:function(e,t,n,r,i,o,a){return Tc(void 0,void 0,void 0,G.a.mark((function s(){var l,c;return G.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return Object(Uo.b)(gt.a.isUri(t)),Object(Uo.b)(Oe.a.isIPosition(n)),Object(Uo.b)(Array.isArray(r)),Object(Uo.b)("undefined"===typeof i||"string"===typeof i),Object(Uo.b)("undefined"===typeof a||"boolean"===typeof a),l=e.get($e.a),s.next=8,l.openCodeEditor({resource:t},l.getFocusedCodeEditor());case 8:if(c=s.sent,!Object(ja.b)(c)){s.next=13;break}return c.setPosition(n),c.revealPositionInCenterIfOutsideViewport(n,0),s.abrupt("return",c.invokeWithinContext((function(e){var t=new(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return o||Object(Rt.a)(Object(Mt.a)(n.prototype),"_getNoResultFoundMessage",this).call(this,e)}}]),n}(Mc))({muteMessage:!Boolean(o),openInPeek:Boolean(a),openToSide:!1},r,i);e.get(Ht.a).invokeFunction(t.run.bind(t),c)})));case 13:case"end":return s.stop()}}),s)})))}}),dn.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:gt.a},{name:"position",description:"The position at which to start",constraint:Oe.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,r,i){return Tc(void 0,void 0,void 0,G.a.mark((function o(){return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e.get(dn.b).executeCommand("editor.action.goToLocations",t,n,r,i,void 0,!0);case 1:case"end":return o.stop()}}),o)})))}}),dn.a.registerCommand({id:"editor.action.findReferences",handler:function(e,t,n){Object(Uo.b)(gt.a.isUri(t)),Object(Uo.b)(Oe.a.isIPosition(n));var r=e.get($e.a);return r.openCodeEditor({resource:t},r.getFocusedCodeEditor()).then((function(e){if(Object(ja.b)(e)&&e.hasModel()){var t=ic.get(e);if(t){var r=Object(Ee.f)((function(t){return hc(e.getModel(),Oe.a.lift(n),!1,t).then((function(e){return new fl(e,Z.a("ref.title","References"))}))})),i=new Te.a(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(i,r,!1))}}}))}}),dn.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");n(498);var Pc=n(115);function jc(e,t){return!!e[t]}var Fc=function e(t,n){Object(Y.a)(this,e),this.target=t.target,this.hasTriggerModifier=jc(t.event,n.triggerModifier),this.hasSideBySideModifier=jc(t.event,n.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=t.event.detail<=1},Bc=function e(t,n){Object(Y.a)(this,e),this.keyCodeIsTriggerKey=t.keyCode===n.triggerKey,this.keyCodeIsSideBySideKey=t.keyCode===n.triggerSideBySideKey,this.hasTriggerModifier=jc(t,n.triggerModifier)},Uc=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.triggerKey=t,this.triggerModifier=n,this.triggerSideBySideKey=r,this.triggerSideBySideModifier=i}return Object($.a)(e,[{key:"equals",value:function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}]),e}();function Hc(e){return"altKey"===e?Ke.f?new Uc(57,"metaKey",6,"altKey"):new Uc(5,"ctrlKey",6,"altKey"):Ke.f?new Uc(6,"altKey",57,"metaKey"):new Uc(6,"altKey",5,"ctrlKey")}var zc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._onMouseMoveOrRelevantKeyDown=r._register(new en.a),r.onMouseMoveOrRelevantKeyDown=r._onMouseMoveOrRelevantKeyDown.event,r._onExecute=r._register(new en.a),r.onExecute=r._onExecute.event,r._onCancel=r._register(new en.a),r.onCancel=r._onCancel.event,r._editor=e,r._opts=Hc(r._editor.getOption(61)),r._lastMouseMoveEvent=null,r._hasTriggerKeyOnMouseDown=!1,r._lineNumberOnMouseDown=0,r._register(r._editor.onDidChangeConfiguration((function(e){if(e.hasChanged(61)){var t=Hc(r._editor.getOption(61));if(r._opts.equals(t))return;r._opts=t,r._lastMouseMoveEvent=null,r._hasTriggerKeyOnMouseDown=!1,r._lineNumberOnMouseDown=0,r._onCancel.fire()}}))),r._register(r._editor.onMouseMove((function(e){return r._onEditorMouseMove(new Fc(e,r._opts))}))),r._register(r._editor.onMouseDown((function(e){return r._onEditorMouseDown(new Fc(e,r._opts))}))),r._register(r._editor.onMouseUp((function(e){return r._onEditorMouseUp(new Fc(e,r._opts))}))),r._register(r._editor.onKeyDown((function(e){return r._onEditorKeyDown(new Bc(e,r._opts))}))),r._register(r._editor.onKeyUp((function(e){return r._onEditorKeyUp(new Bc(e,r._opts))}))),r._register(r._editor.onMouseDrag((function(){return r._resetHandler()}))),r._register(r._editor.onDidChangeCursorSelection((function(e){return r._onDidChangeCursorSelection(e)}))),r._register(r._editor.onDidChangeModel((function(e){return r._resetHandler()}))),r._register(r._editor.onDidChangeModelContent((function(){return r._resetHandler()}))),r._register(r._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&r._resetHandler()}))),r}return Object($.a)(n,[{key:"_onDidChangeCursorSelection",value:function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}},{key:"_onEditorMouseMove",value:function(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}},{key:"_onEditorMouseDown",value:function(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}},{key:"_onEditorMouseUp",value:function(e){var t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}},{key:"_onEditorKeyDown",value:function(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}},{key:"_onEditorKeyUp",value:function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}},{key:"_resetHandler",value:function(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}]),n}(we.a),Vc=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Wc=function(e,t){return function(n,r){t(n,r,e)}},Gc=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this.textModelResolverService=n,this.modeService=r,this.toUnhook=new we.b,this.toUnhookForKeyboard=new we.b,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=t;var o=new zc(t);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((function(e){var t=Object(ke.a)(e,2),n=t[0],r=t[1];i.startFindDefinitionFromMouse(n,Object(Uo.n)(r))}))),this.toUnhook.add(o.onExecute((function(e){i.isEnabled(e)&&i.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((function(){i.removeLinkDecorations()}),(function(e){i.removeLinkDecorations(),Object(ie.e)(e)}))}))),this.toUnhook.add(o.onCancel((function(){i.removeLinkDecorations(),i.currentWordAtPosition=null})))}return Object($.a)(e,[{key:"startFindDefinitionFromCursor",value:function(e){var t=this;return this.startFindDefinition(e).then((function(){t.toUnhookForKeyboard.add(t.editor.onDidChangeCursorPosition((function(){t.currentWordAtPosition=null,t.removeLinkDecorations(),t.toUnhookForKeyboard.clear()}))),t.toUnhookForKeyboard.add(t.editor.onKeyDown((function(e){e&&(t.currentWordAtPosition=null,t.removeLinkDecorations(),t.toUnhookForKeyboard.clear())})))}))}},{key:"startFindDefinitionFromMouse",value:function(e,t){if(!(9===e.target.type&&this.linkDecorations.length>0)){if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();var n=e.target.position;this.startFindDefinition(n)}}},{key:"startFindDefinition",value:function(e){var t,n=this;this.toUnhookForKeyboard.clear();var r=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!r)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===r.startColumn&&this.currentWordAtPosition.endColumn===r.endColumn&&this.currentWordAtPosition.word===r.word)return Promise.resolve(0);this.currentWordAtPosition=r;var i=new mt.a(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Object(Ee.f)((function(t){return n.findDefinition(e,t)})),this.previousPromise.then((function(t){if(t&&t.length&&i.validate(n.editor))if(t.length>1)n.addDecoration(new Te.a(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn),(new oe).appendText(Z.a("multipleResults","Click to show {0} definitions.",t.length)));else{var o=t[0];if(!o.uri)return;n.textModelResolverService.createModelReference(o.uri).then((function(t){if(t.object&&t.object.textEditorModel){var i=t.object.textEditorModel,a=o.range.startLineNumber;if(a<1||a>i.getLineCount())t.dispose();else{var s,l=n.getPreviewValue(i,a,o);s=o.originSelectionRange?Te.a.lift(o.originSelectionRange):new Te.a(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn);var c=n.modeService.getModeIdByFilepathOrFirstLine(i.uri);n.addDecoration(s,(new oe).appendCodeblock(c||"",l)),t.dispose()}}else t.dispose()}))}else n.removeLinkDecorations()})).then(void 0,ie.e)}},{key:"getPreviewValue",value:function(t,n,r){var i=r.targetSelectionRange?r.range:this.getPreviewRangeBasedOnBrackets(t,n);return i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,i)}},{key:"stripIndentationFromPreviewRange",value:function(e,t,n){for(var r=e.getLineFirstNonWhitespaceColumn(t),i=t+1;ir)return new Te.a(n,1,r+1,1);a=t.findNextBracket(new Oe.a(c,u))}return new Te.a(n,1,r+1,1)}},{key:"addDecoration",value:function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[n])}},{key:"removeLinkDecorations",value:function(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}},{key:"isEnabled",value:function(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&vt.f.has(this.editor.getModel())}},{key:"findDefinition",value:function(e,t){var n=this.editor.getModel();return n?lc(n,e,t):Promise.resolve(null)}},{key:"gotoDefinition",value:function(e,t){var n=this;return this.editor.setPosition(e),this.editor.invokeWithinContext((function(e){var r=!t&&n.editor.getOption(69)&&!n.isInPeekEditor(e);return new Nc({openToSide:t,openInPeek:r,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,n.editor)}))}},{key:"isInPeekEditor",value:function(e){var t=e.get(te.b);return Hs.inPeekEditor.getValue(t)}},{key:"dispose",value:function(){this.toUnhook.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Gc.ID="editor.contrib.gotodefinitionatposition",Gc.MAX_SOURCE_PREVIEW_LINES=8,Gc=Vc([Wc(1,as.a),Wc(2,Pc.a)],Gc),Object(Q.m)(Gc.ID,Gc),Object(Ae.g)((function(e,t){var n=e.getColor(Le.r);n&&t.addRule(".monaco-editor .goto-definition-link { color: ".concat(n," !important; }"))}));n(499);var qc,Kc=n(109),Yc=n(76);(qc||(qc={})).className=function(e){switch(e){case Yc.a.Ignore:return"severity-ignore "+re.a.info.classNames;case Yc.a.Info:return re.a.info.classNames;case Yc.a.Warning:return re.a.warning.classNames;case Yc.a.Error:return re.a.error.classNames;default:return""}},Object(Ae.g)((function(e,t){var n=e.getColor(Le.Zb);if(n){var r=re.a.error.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(r,",\n\t\t\t.markers-panel .marker-icon").concat(r,",\n\t\t\t.extensions-viewlet > .extensions ").concat(r," {\n\t\t\t\tcolor: ").concat(n,";\n\t\t\t}\n\t\t"))}var i=e.getColor(Le.bc);if(i){var o=re.a.warning.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(o,",\n\t\t\t.markers-panel .marker-icon").concat(o,",\n\t\t\t.extensions-viewlet > .extensions ").concat(o,",\n\t\t\t.extension-editor ").concat(o," {\n\t\t\t\tcolor: ").concat(i,";\n\t\t\t}\n\t\t"))}var a=e.getColor(Le.ac);if(a){var s=re.a.info.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(s,",\n\t\t\t.markers-panel .marker-icon").concat(s,",\n\t\t\t.extensions-viewlet > .extensions ").concat(s,",\n\t\t\t.extension-editor ").concat(s," {\n\t\t\t\tcolor: ").concat(a,";\n\t\t\t}\n\t\t"))}}));var $c=n(85),Qc=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Zc=function(e,t){return function(n,r){t(n,r,e)}},Xc=function(){function e(t,n,r,i){var o=this;Object(Y.a)(this,e),this._openerService=i,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new we.b,this._editor=n;var a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),zt.addClass(this._messageBlock,"message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(zt.addStandardDisposableListener(this._relatedBlock,"click",(function(e){e.preventDefault();var t=o._relatedDiagnostics.get(e.target);t&&r(t)}))),this._scrollable=new Kc.b(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),t.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((function(e){a.style.left="-".concat(e.scrollLeft,"px"),a.style.top="-".concat(e.scrollTop,"px")}))),this._disposables.add(this._scrollable)}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this._disposables)}},{key:"update",value:function(e){var t=this,n=e.source,r=e.message,i=e.relatedInformation,o=e.code,a=((null===n||void 0===n?void 0:n.length)||0)+"()".length;o&&(a+="string"===typeof o?o.length:o.value.length);var s=r.split(/\r\n|\r|\n/g);this._lines=s.length,this._longestLineLength=0;var l,c=Object(Ce.a)(s);try{for(c.s();!(l=c.n()).done;){var u=l.value;this._longestLineLength=Math.max(u.length+a,this._longestLineLength)}}catch(x){c.e(x)}finally{c.f()}zt.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);var d,h=this._messageBlock,f=Object(Ce.a)(s);try{for(f.s();!(d=f.n()).done;){var p=d.value;(h=document.createElement("div")).innerText=p,""===p&&(h.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(h)}}catch(x){f.e(x)}finally{f.f()}if(n||o){var g=document.createElement("span");if(zt.addClass(g,"details"),h.appendChild(g),n){var m=document.createElement("span");m.innerText=n,zt.addClass(m,"source"),g.appendChild(m)}if(o)if("string"===typeof o){var v=document.createElement("span");v.innerText="(".concat(o,")"),zt.addClass(v,"code"),g.appendChild(v)}else{this._codeLink=zt.$("a.code-link"),this._codeLink.setAttribute("href","".concat(o.target.toString())),this._codeLink.onclick=function(e){t._openerService.open(o.target),e.preventDefault(),e.stopPropagation()},zt.append(this._codeLink,zt.$("span")).innerText=o.value,g.appendChild(this._codeLink)}}if(zt.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Object(ne.o)(i)){var _=this._relatedBlock.appendChild(document.createElement("div"));_.style.paddingTop="".concat(Math.floor(.66*this._editor.getOption(51)),"px"),this._lines+=1;var b,y=Object(Ce.a)(i);try{for(y.s();!(b=y.n()).done;){var S=b.value,C=document.createElement("div"),k=document.createElement("a");zt.addClass(k,"filename"),k.innerText="".concat(Sl(S.resource),"(").concat(S.startLineNumber,", ").concat(S.startColumn,"): "),k.title=yl(S.resource,void 0),this._relatedDiagnostics.set(k,S);var E=document.createElement("span");E.innerText=S.message,C.appendChild(k),C.appendChild(E),this._lines+=1,_.appendChild(C)}}catch(x){y.e(x)}finally{y.f()}}var w=this._editor.getOption(36),O=Math.ceil(w.typicalFullwidthCharacterWidth*this._longestLineLength*.75),T=w.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:O,scrollHeight:T})}},{key:"layout",value:function(e,t){this._scrollable.getDomNode().style.height="".concat(e,"px"),this._scrollable.getDomNode().style.width="".concat(t,"px"),this._scrollable.setScrollDimensions({width:t,height:e})}},{key:"getHeightInLines",value:function(){return Math.min(17,this._lines)}},{key:"getAriaLabel",value:function(e){var t="";switch(e.severity){case hn.c.Error:t=Z.a("Error","Error");break;case hn.c.Warning:t=Z.a("Warning","Warning");break;case hn.c.Info:t=Z.a("Info","Info");break;case hn.c.Hint:t=Z.a("Hint","Hint")}var n=Z.a("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();if(r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1){var i=r.getLineContent(e.startLineNumber);n="".concat(i,", ").concat(n)}return n}}]),e}(),Jc=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s){var l;return Object(Y.a)(this,n),(l=t.call(this,e,{showArrow:!0,showFrame:!0,isAccessible:!0},a))._themeService=r,l._openerService=i,l._menuService=o,l._contextKeyService=s,l._callOnDispose=new we.b,l._onDidSelectRelatedInformation=new en.a,l.onDidSelectRelatedInformation=l._onDidSelectRelatedInformation.event,l._severity=hn.c.Warning,l._backgroundColor=nr.a.white,l._applyTheme(r.getColorTheme()),l._callOnDispose.add(r.onDidColorThemeChange(l._applyTheme.bind(Object(ut.a)(l)))),l.create(),l}return Object($.a)(n,[{key:"_applyTheme",value:function(e){this._backgroundColor=e.getColor(au);var t=ru;this._severity===hn.c.Warning?t=iu:this._severity===hn.c.Info&&(t=ou);var n=e.getColor(t);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(Qs),secondaryHeadingColor:e.getColor(Zs)})}},{key:"_applyStyles",value:function(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),Object(Rt.a)(Object(Mt.a)(n.prototype),"_applyStyles",this).call(this)}},{key:"dispose",value:function(){this._callOnDispose.dispose(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"_fillHead",value:function(e){var t=this;Object(Rt.a)(Object(Mt.a)(n.prototype),"_fillHead",this).call(this,e),this._disposables.add(this._actionbarWidget.actionRunner.onDidBeforeRun((function(e){return t.editor.focus()})));var r=[],i=this._menuService.createMenu(n.TitleMenu,this._contextKeyService);Ps(i,void 0,r),this._actionbarWidget.push(r,{label:!1,icon:!0,index:0}),i.dispose()}},{key:"_fillTitleIcon",value:function(e){this._icon=zt.append(e,zt.$(""))}},{key:"_getActionBarOptions",value:function(){return Object.assign(Object.assign({},Object(Rt.a)(Object(Mt.a)(n.prototype),"_getActionBarOptions",this).call(this)),{orientation:0})}},{key:"_fillBody",value:function(e){var t=this;this._parentContainer=e,zt.addClass(e,"marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Xc(this._container,this.editor,(function(e){return t._onDidSelectRelatedInformation.fire(e)}),this._openerService),this._disposables.add(this._message)}},{key:"show",value:function(){throw new Error("call showAtMarker")}},{key:"showAtMarker",value:function(e,t,r){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());var i=Te.a.lift(e),o=this.editor.getPosition(),a=o&&i.containsPosition(o)?o:i.getStartPosition();Object(Rt.a)(Object(Mt.a)(n.prototype),"show",this).call(this,a,this.computeRequiredHeight());var s=this.editor.getModel();if(s){var l=r>1?Z.a("problems","{0} of {1} problems",t,r):Z.a("change","{0} of {1} problem",t,r);this.setTitle(Object(gn.b)(s.uri),l)}this._icon.className="codicon ".concat(qc.className(hn.c.toSeverity(this._severity))),this.editor.revealPositionNearTop(a,0),this.editor.focus()}},{key:"updateMarker",value:function(e){this._container.classList.remove("stale"),this._message.update(e)}},{key:"showStale",value:function(){this._container.classList.add("stale"),this._relayout()}},{key:"_doLayoutBody",value:function(e,t){Object(Rt.a)(Object(Mt.a)(n.prototype),"_doLayoutBody",this).call(this,e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height="".concat(e,"px")}},{key:"_onWidth",value:function(e){this._message.layout(this._heightInPixel,e)}},{key:"_relayout",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"_relayout",this).call(this,this.computeRequiredHeight())}},{key:"computeRequiredHeight",value:function(){return 3+this._message.getHeightInLines()}}]),n}(Ys);Jc.TitleMenu=new Ie.b("gotoErrorTitleMenu"),Jc=Qc([Zc(1,Ae.c),Zc(2,$c.a),Zc(3,Ie.a),Zc(4,Ht.a),Zc(5,te.b)],Jc);var eu=Object(Le.Ub)(Le.u,Le.t),tu=Object(Le.Ub)(Le.T,Le.S),nu=Object(Le.Ub)(Le.L,Le.K),ru=Object(Le.gc)("editorMarkerNavigationError.background",{dark:eu,light:eu,hc:eu},Z.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),iu=Object(Le.gc)("editorMarkerNavigationWarning.background",{dark:tu,light:tu,hc:tu},Z.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),ou=Object(Le.gc)("editorMarkerNavigationInfo.background",{dark:nu,light:nu,hc:nu},Z.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),au=Object(Le.gc)("editorMarkerNavigation.background",{dark:"#2D2D30",light:nr.a.white,hc:"#0C141F"},Z.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(Ae.g)((function(e,t){var n=e.getColor(Le.rc);n&&(t.addRule(".monaco-editor .marker-widget a { color: ".concat(n,"; }")),t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: ".concat(n,"; }")))}));var su=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},lu=function(e,t){return function(n,r){t(n,r,e)}},cu=function e(t,n,r){Object(Y.a)(this,e),this.marker=t,this.index=n,this.total=r},uu=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._markerService=n,this._onDidChange=new en.a,this.onDidChange=this._onDidChange.event,this._dispoables=new we.b,this._markers=[],this._nextIdx=-1,gt.a.isUri(t)?this._resourceFilter=function(e){return e.toString()===t.toString()}:t&&(this._resourceFilter=t);var i=function(){r._markers=r._markerService.read({resource:gt.a.isUri(t)?t:void 0,severities:hn.c.Error|hn.c.Warning|hn.c.Info}),"function"===typeof t&&(r._markers=r._markers.filter((function(e){return r._resourceFilter(e.resource)}))),r._markers.sort(e._compareMarker)};i(),this._dispoables.add(n.onMarkerChanged((function(e){r._resourceFilter&&!e.some((function(e){return r._resourceFilter(e)}))||(i(),r._nextIdx=-1,r._onDidChange.fire())})))}return Object($.a)(e,[{key:"dispose",value:function(){this._dispoables.dispose(),this._onDidChange.dispose()}},{key:"matches",value:function(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}},{key:"_initIdx",value:function(e,t,n){var r=!1,i=this._markers.findIndex((function(t){return t.resource.toString()===e.uri.toString()}));i<0&&(i=Object(ne.c)(this._markers,{resource:e.uri},(function(e,t){return Object(ht.f)(e.resource.toString(),t.resource.toString())})))<0&&(i=~i);for(var o=i;o=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},pu=function(e,t){return function(n,r){t(n,r,e)}},gu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},mu=function(){function e(t,n,r,i,o){Object(Y.a)(this,e),this._markerNavigationService=n,this._contextKeyService=r,this._editorService=i,this._instantiationService=o,this._sessionDispoables=new we.b,this._editor=t,this._widgetVisible=Cu.bindTo(this._contextKeyService)}return Object($.a)(e,[{key:"dispose",value:function(){this._cleanUp(),this._sessionDispoables.dispose()}},{key:"_cleanUp",value:function(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}},{key:"_getOrCreateModel",value:function(e){var t=this;if(this._model&&this._model.matches(e))return this._model;var n=!1;return this._model&&(n=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),n&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Jc,this._editor),this._widget.onDidClose((function(){return t.close()}),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((function(e){var n,r,i;(null===(n=t._model)||void 0===n?void 0:n.selected)&&Te.a.containsPosition(null===(r=t._model)||void 0===r?void 0:r.selected.marker,e.position)||null===(i=t._model)||void 0===i||i.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((function(){if(t._widget&&t._widget.position&&t._model){var e=t._model.find(t._editor.getModel().uri,t._widget.position);e?t._widget.updateMarker(e.marker):t._widget.showStale()}}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((function(e){t._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:Te.a.lift(e).collapseToStart()}},t._editor),t.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((function(){return t._cleanUp()}))),this._model}},{key:"close",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._cleanUp(),e&&this._editor.focus()}},{key:"showAtMarker",value:function(e){if(this._editor.hasModel()){var t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new Oe.a(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}},{key:"nagivate",value:function(t,n){return gu(this,void 0,void 0,G.a.mark((function r(){var i,o;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this._editor.hasModel()){r.next=14;break}if((i=this._getOrCreateModel(n?void 0:this._editor.getModel().uri)).move(t,this._editor.getModel(),this._editor.getPosition()),i.selected){r.next=5;break}return r.abrupt("return");case 5:if(i.selected.marker.resource.toString()===this._editor.getModel().uri.toString()){r.next=13;break}return this._cleanUp(),r.next=9,this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);case 9:(o=r.sent)&&(e.get(o).close(),e.get(o).nagivate(t,n)),r.next=14;break;case 13:this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total);case 14:case"end":return r.stop()}}),r,this)})))}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();mu.ID="editor.contrib.markerController",mu=fu([pu(1,du),pu(2,te.b),pu(3,$e.a),pu(4,Ht.a)],mu);var vu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this,i))._next=e,o._multiFile=r,o}return Object($.a)(n,[{key:"run",value:function(e,t){return gu(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.hasModel()&&mu.get(t).nagivate(this._next,this._multiFile);case 1:case"end":return e.stop()}}),e,this)})))}}]),n}(Q.b),_u=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,!1,{id:n.ID,label:n.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:578,weight:100},menuOpts:{menuId:Jc.TitleMenu,title:n.LABEL,icon:Object(re.e)("marker-navigation-next",re.a.chevronDown),group:"navigation",order:1}})}return n}(vu);_u.ID="editor.action.marker.next",_u.LABEL=Z.a("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");var bu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,!1,{id:n.ID,label:n.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1602,weight:100},menuOpts:{menuId:Jc.TitleMenu,title:_u.LABEL,icon:Object(re.e)("marker-navigation-previous",re.a.chevronUp),group:"navigation",order:2}})}return n}(vu);bu.ID="editor.action.marker.prev",bu.LABEL=Z.a("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");var yu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,!0,{id:"editor.action.marker.nextInFiles",label:Z.a("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:66,weight:100},menuOpts:{menuId:Ie.b.MenubarGoMenu,title:Z.a({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}return n}(vu),Su=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,!0,{id:"editor.action.marker.prevInFiles",label:Z.a("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1090,weight:100},menuOpts:{menuId:Ie.b.MenubarGoMenu,title:Z.a({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}return n}(vu);Object(Q.m)(mu.ID,mu),Object(Q.k)(_u),Object(Q.k)(bu),Object(Q.k)(yu),Object(Q.k)(Su);var Cu=new te.c("markersNavigationVisible",!1),ku=Q.c.bindToContribution(mu.get);Object(Q.l)(new ku({id:"closeMarkersNavigation",precondition:Cu,handler:function(e){return e.close()},kbOpts:{weight:150,kbExpr:X.a.focus,primary:9,secondary:[1033]}}));var Eu=function(){function e(t,n,r){Object(Y.a)(this,e),this.presentationIndex=r,this._onColorFlushed=new en.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new en.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new en.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=t,this._color=t,this._colorPresentations=n}return Object($.a)(e,[{key:"selectNextColorPresentation",value:function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}},{key:"guessColorPresentation",value:function(e,t){for(var n=0;ne.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}}]),e}(),wu=(n(500),zt.$),Ou=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;Object(Y.a)(this,n),(o=t.call(this)).model=r,o.domNode=wu(".colorpicker-header"),zt.append(e,o.domNode),o.pickedColorNode=zt.append(o.domNode,wu(".picked-color"));var a=zt.append(o.domNode,wu(".original-color"));return a.style.backgroundColor=nr.a.Format.CSS.format(o.model.originalColor)||"",o.backgroundColor=i.getColorTheme().getColor(Le.E)||nr.a.white,o._register(Object(Ae.g)((function(e,t){o.backgroundColor=e.getColor(Le.E)||nr.a.white}))),o._register(zt.addDisposableListener(o.pickedColorNode,zt.EventType.CLICK,(function(){return o.model.selectNextColorPresentation()}))),o._register(zt.addDisposableListener(a,zt.EventType.CLICK,(function(){o.model.color=o.model.originalColor,o.model.flushColor()}))),o._register(r.onDidChangeColor(o.onDidChangeColor,Object(ut.a)(o))),o._register(r.onDidChangePresentation(o.onDidChangePresentation,Object(ut.a)(o))),o.pickedColorNode.style.backgroundColor=nr.a.Format.CSS.format(r.color)||"",zt.toggleClass(o.pickedColorNode,"light",r.color.rgba.a<.5?o.backgroundColor.isLighter():r.color.isLighter()),o}return Object($.a)(n,[{key:"onDidChangeColor",value:function(e){this.pickedColorNode.style.backgroundColor=nr.a.Format.CSS.format(e)||"",zt.toggleClass(this.pickedColorNode,"light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}},{key:"onDidChangePresentation",value:function(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}]),n}(we.a),Tu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this)).model=r,o.pixelRatio=i,o.domNode=wu(".colorpicker-body"),zt.append(e,o.domNode),o.saturationBox=new xu(o.domNode,o.model,o.pixelRatio),o._register(o.saturationBox),o._register(o.saturationBox.onDidChange(o.onDidSaturationValueChange,Object(ut.a)(o))),o._register(o.saturationBox.onColorFlushed(o.flushColor,Object(ut.a)(o))),o.opacityStrip=new Du(o.domNode,o.model),o._register(o.opacityStrip),o._register(o.opacityStrip.onDidChange(o.onDidOpacityChange,Object(ut.a)(o))),o._register(o.opacityStrip.onColorFlushed(o.flushColor,Object(ut.a)(o))),o.hueStrip=new Lu(o.domNode,o.model),o._register(o.hueStrip),o._register(o.hueStrip.onDidChange(o.onDidHueChange,Object(ut.a)(o))),o._register(o.hueStrip.onColorFlushed(o.flushColor,Object(ut.a)(o))),o}return Object($.a)(n,[{key:"flushColor",value:function(){this.model.flushColor()}},{key:"onDidSaturationValueChange",value:function(e){var t=e.s,n=e.v,r=this.model.color.hsva;this.model.color=new nr.a(new nr.b(r.h,t,n,r.a))}},{key:"onDidOpacityChange",value:function(e){var t=this.model.color.hsva;this.model.color=new nr.a(new nr.b(t.h,t.s,t.v,e))}},{key:"onDidHueChange",value:function(e){var t=this.model.color.hsva,n=360*(1-e);this.model.color=new nr.a(new nr.b(360===n?0:n,t.s,t.v,t.a))}},{key:"layout",value:function(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}]),n}(we.a),xu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this)).model=r,o.pixelRatio=i,o._onDidChange=new en.a,o.onDidChange=o._onDidChange.event,o._onColorFlushed=new en.a,o.onColorFlushed=o._onColorFlushed.event,o.domNode=wu(".saturation-wrap"),zt.append(e,o.domNode),o.canvas=document.createElement("canvas"),o.canvas.className="saturation-box",zt.append(o.domNode,o.canvas),o.selection=wu(".saturation-selection"),zt.append(o.domNode,o.selection),o.layout(),o._register(zt.addDisposableGenericMouseDownListner(o.domNode,(function(e){return o.onMouseDown(e)}))),o._register(o.model.onDidChangeColor(o.onDidChangeColor,Object(ut.a)(o))),o.monitor=null,o}return Object($.a)(n,[{key:"onMouseDown",value:function(e){var t=this;this.monitor=this._register(new Jt.a);var n=zt.getDomNodePagePosition(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,Jt.b,(function(e){return t.onDidChangePosition(e.posx-n.left,e.posy-n.top)}),(function(){return null}));var r=zt.addDisposableGenericMouseUpListner(document,(function(){t._onColorFlushed.fire(),r.dispose(),t.monitor&&(t.monitor.stopMonitoring(!0),t.monitor=null)}),!0)}},{key:"onDidChangePosition",value:function(e,t){var n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}},{key:"layout",value:function(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();var e=this.model.color.hsva;this.paintSelection(e.s,e.v)}},{key:"paint",value:function(){var e=this.model.color.hsva,t=new nr.a(new nr.b(e.h,1,1,1)),n=this.canvas.getContext("2d"),r=n.createLinearGradient(0,0,this.canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");var i=n.createLinearGradient(0,0,0,this.canvas.height);i.addColorStop(0,"rgba(0, 0, 0, 0)"),i.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=nr.a.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=i,n.fill()}},{key:"paintSelection",value:function(e,t){this.selection.style.left="".concat(e*this.width,"px"),this.selection.style.top="".concat(this.height-t*this.height,"px")}},{key:"onDidChangeColor",value:function(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}]),n}(we.a),Nu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).model=r,i._onDidChange=new en.a,i.onDidChange=i._onDidChange.event,i._onColorFlushed=new en.a,i.onColorFlushed=i._onColorFlushed.event,i.domNode=zt.append(e,wu(".strip")),i.overlay=zt.append(i.domNode,wu(".overlay")),i.slider=zt.append(i.domNode,wu(".slider")),i.slider.style.top="0px",i._register(zt.addDisposableGenericMouseDownListner(i.domNode,(function(e){return i.onMouseDown(e)}))),i.layout(),i}return Object($.a)(n,[{key:"layout",value:function(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;var e=this.getValue(this.model.color);this.updateSliderPosition(e)}},{key:"onMouseDown",value:function(e){var t=this,n=this._register(new Jt.a),r=zt.getDomNodePagePosition(this.domNode);zt.addClass(this.domNode,"grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),n.startMonitoring(e.target,e.buttons,Jt.b,(function(e){return t.onDidChangeTop(e.posy-r.top)}),(function(){return null}));var i=zt.addDisposableGenericMouseUpListner(document,(function(){t._onColorFlushed.fire(),i.dispose(),n.stopMonitoring(!0),zt.removeClass(t.domNode,"grabbing")}),!0)}},{key:"onDidChangeTop",value:function(e){var t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}},{key:"updateSliderPosition",value:function(e){this.slider.style.top="".concat((1-e)*this.height,"px")}}]),n}(we.a),Du=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),i=t.call(this,e,r),zt.addClass(i.domNode,"opacity-strip"),i._register(r.onDidChangeColor(i.onDidChangeColor,Object(ut.a)(i))),i.onDidChangeColor(i.model.color),i}return Object($.a)(n,[{key:"onDidChangeColor",value:function(e){var t=e.rgba,n=t.r,r=t.g,i=t.b,o=new nr.a(new nr.c(n,r,i,1)),a=new nr.a(new nr.c(n,r,i,0));this.overlay.style.background="linear-gradient(to bottom, ".concat(o," 0%, ").concat(a," 100%)")}},{key:"getValue",value:function(e){return e.hsva.a}}]),n}(Nu),Lu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),i=t.call(this,e,r),zt.addClass(i.domNode,"hue-strip"),i}return Object($.a)(n,[{key:"getValue",value:function(e){return 1-e.hsva.h/360}}]),n}(Nu),Au=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;Object(Y.a)(this,n),(a=t.call(this)).model=r,a.pixelRatio=i,a._register(Object(qe.n)((function(){return a.layout()})));var s=wu(".colorpicker-widget");e.appendChild(s);var l=new Ou(s,a.model,o);return a.body=new Tu(s,a.model,a.pixelRatio),a._register(l),a._register(a.body),a}return Object($.a)(n,[{key:"layout",value:function(){this.body.layout()}}]),n}(di.a);function Iu(e,t,n){var r=vt.p.ordered(e).map((function(r){return Promise.resolve(r.provideHover(e,t,n)).then((function(e){return e&&function(e){var t="undefined"!==typeof e.range,n="undefined"!==typeof e.contents&&e.contents&&e.contents.length>0;return t&&n}(e)?e:void 0}),(function(e){Object(ie.f)(e)}))}));return Promise.all(r).then(ne.d)}Object(Q.p)("_executeHoverProvider",(function(e,t){return Iu(e,t,pt.a.None)}));var Ru=function(){function e(t,n,r,i,o){var a=this;Object(Y.a)(this,e),this._computer=t,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new Ee.d((function(){return a._triggerAsyncComputation()}),0),this._secondWaitScheduler=new Ee.d((function(){return a._triggerSyncComputation()}),0),this._loadingMessageScheduler=new Ee.d((function(){return a._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=n,this._errorCallback=r,this._progressCallback=i}return Object($.a)(e,[{key:"setHoverTime",value:function(e){this._hoverTime=e}},{key:"_firstWaitTime",value:function(){return this._hoverTime/2}},{key:"_secondWaitTime",value:function(){return this._hoverTime/2}},{key:"_loadingMessageTime",value:function(){return 3*this._hoverTime}},{key:"_triggerAsyncComputation",value:function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(Ee.f)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0}},{key:"_triggerSyncComputation",value:function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}},{key:"_showLoadingMessage",value:function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}},{key:"_withAsyncResult",value:function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}},{key:"_onComplete",value:function(e){this._completeCallback(e)}},{key:"_onError",value:function(e){this._errorCallback?this._errorCallback(e):Object(ie.e)(e)}},{key:"_onProgress",value:function(e){this._progressCallback(e)}},{key:"start",value:function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}},{key:"cancel",value:function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}]),e}(),Mu=(n(501),zt.$),Pu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this)).containerDomNode=document.createElement("div"),e.containerDomNode.className="monaco-hover",e.containerDomNode.tabIndex=0,e.containerDomNode.setAttribute("role","tooltip"),e.contentsDomNode=document.createElement("div"),e.contentsDomNode.className="monaco-hover-content",e._scrollbar=e._register(new Kc.a(e.contentsDomNode,{})),e.containerDomNode.appendChild(e._scrollbar.getDomNode()),e}return Object($.a)(n,[{key:"onContentsChanged",value:function(){this._scrollbar.scanDomNode()}}]),n}(we.a);var ju,Fu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._hoverVisibleKey=i,a._keybindingService=o,a.allowEditorOverflow=!0,a._hover=a._register(new Pu),a._id=e,a._editor=r,a._isVisible=!1,a._stoleFocus=!1,a.onkeydown(a._hover.containerDomNode,(function(e){e.equals(9)&&a.hide()})),a._register(a._editor.onDidChangeConfiguration((function(e){e.hasChanged(36)&&a.updateFont()}))),a._editor.onDidLayoutChange((function(e){return a.layout()})),a.layout(),a._editor.addContentWidget(Object(ut.a)(a)),a._showAtPosition=null,a._showAtRange=null,a._stoleFocus=!1,a}return Object($.a)(n,[{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._hover.containerDomNode}},{key:"showAt",value:function(e,t,n){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=n,n&&this._hover.containerDomNode.focus()}},{key:"hide",value:function(){var e=this;this.isVisible&&(setTimeout((function(){e.isVisible||e._hoverVisibleKey.set(!1)}),0),this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())}},{key:"getPosition",value:function(){return this.isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}},{key:"dispose",value:function(){this._editor.removeContentWidget(this),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"updateFont",value:function(){var e=this;Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))}},{key:"updateContents",value:function(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}},{key:"_renderAction",value:function(e,t){var n=this._keybindingService.lookupKeybinding(t.commandId);return function(e,t,n){var r=zt.append(e,Mu("div.action-container")),i=zt.append(r,Mu("a.action"));return i.setAttribute("href","#"),i.setAttribute("role","button"),t.iconClass&&zt.append(i,Mu("span.icon.".concat(t.iconClass))),zt.append(i,Mu("span")).textContent=n?"".concat(t.label," (").concat(n,")"):t.label,zt.addDisposableListener(r,zt.EventType.CLICK,(function(e){e.stopPropagation(),e.preventDefault(),t.run(r)}))}(e,t,n?n.getLabel():null)}},{key:"layout",value:function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getOption(36),n=t.fontSize,r=t.lineHeight;this._hover.contentsDomNode.style.fontSize="".concat(n,"px"),this._hover.contentsDomNode.style.lineHeight="".concat(r,"px"),this._hover.contentsDomNode.style.maxHeight="".concat(e,"px"),this._hover.contentsDomNode.style.maxWidth="".concat(Math.max(.66*this._editor.getLayoutInfo().width,500),"px")}},{key:"isVisible",get:function(){return this._isVisible},set:function(e){this._isVisible=e,zt.toggleClass(this._hover.containerDomNode,"hidden",!this._isVisible)}}]),n}(di.a),Bu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._id=e,i._editor=r,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","tooltip"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration((function(e){e.hasChanged(36)&&i.updateFont()}))),i._editor.addOverlayWidget(Object(ut.a)(i)),i}return Object($.a)(n,[{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._domNode}},{key:"showAt",value:function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),r=this._editor.getScrollTop(),i=this._editor.getOption(51),o=n-r-(this._domNode.clientHeight-i)/2;this._domNode.style.left="".concat(t.glyphMarginLeft+t.glyphMarginWidth,"px"),this._domNode.style.top="".concat(Math.max(Math.round(o),0),"px")}},{key:"hide",value:function(){this.isVisible&&(this.isVisible=!1)}},{key:"getPosition",value:function(){return null}},{key:"dispose",value:function(){this._editor.removeOverlayWidget(this),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"updateFont",value:function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));[].concat(Object(ct.a)(t),Object(ct.a)(n)).forEach((function(t){return e._editor.applyFontInfo(t)}))}},{key:"updateContents",value:function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}},{key:"isVisible",get:function(){return this._isVisible},set:function(e){this._isVisible=e,zt.toggleClass(this._domNode,"hidden",!this._isVisible)}}]),n}(di.a),Uu=n(195),Hu=n(310);!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a\s]+))?)*)\s*(\/?)\s*>/,s=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,r)),e=e.substring(r+3),n=!1)}():u.test(e)?p(s,m):c.test(e)&&p(a,g);!function(){if(!n)return;var r,i=e.indexOf("<");i>=0?(r=e.substring(0,i),e=e.substring(i)):(r=e,e="");t.chars&&t.chars(r)}()}();var r=e===h;h=e,r&&(e="")}function p(t,r){var i=e.match(t);i&&(e=e.substring(i[0].length),i[0].replace(t,r),n=!1)}function g(e,n,a,s){var c={},u=i(n),h=o.voids[u]||!!s;a.replace(l,(function(e,t,n,i,o){c[t]=void 0===n&&void 0===i&&void 0===o?void 0:r.decode(n||i||o||"")})),h||d.push(u),t.start&&t.start(u,c,h)}function m(e,n){var r,o=0,a=i(n);if(a)for(o=d.length-1;o>=0&&d[o]!==a;o--);if(o>=0){for(r=d.length-1;r>=o;r--)t.end&&t.end(d[r]);d.length=o}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var r=e("he"),i=e("./lowercase"),o=e("./attributes"),a=e("./elements");t.exports=function(e,t){var n,s=t||{};return d(),{start:function(e,t,a){var u=i(e);if(n.ignoring)return void c(u);if(-1===(s.allowedTags||[]).indexOf(u))return void c(u);if(s.filter&&!s.filter({tag:u,attrs:t}))return void c(u);l("<"),l(u),Object.keys(t).forEach((function(e){var n=t[e],a=(s.allowedClasses||{})[u]||[],c=(s.allowedAttributes||{})[u]||[];c=c.concat((s.allowedAttributes||{})["*"]||[]);var d=i(e);("class"===d&&-1===c.indexOf(d)?(n=n.split(" ").filter((function(e){return a&&-1!==a.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(d)&&(!0!==o.uris[d]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var r=e.indexOf("?");if(-1!==r&&n>r)return!0;var i=e.indexOf("#");return-1!==i&&n>i||s.allowedSchemes.some(o);function o(t){return 0===e.indexOf(t+":")}}(n)))&&(l(" "),l(e),"string"===typeof n&&(l('="'),l(r.encode(n)),l('"')))})),l(a?"/>":">")},end:function(e){var t=i(e);-1!==(s.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(l("")):u(t)},chars:function(e){!1===n.ignoring&&l(s.transformText?s.transformText(e):e)}};function l(t){e.push(t)}function c(e){a.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function u(e){n.ignoring===e&&--n.depth<=0&&d()}function d(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var r={"&":"&","<":"<",">":">",'"':""","'":"'"},i={"&":"&","<":"<",">":">",""":'"',"'":"'"},o=/(&|<|>|"|')/g,a=/[&<>"']/g;function s(e){return r[e]}function l(e){return i[e]}function c(e){return null==e?"":String(e).replace(a,s)}function u(e){return null==e?"":String(e).replace(o,l)}c.options=u.options={},t.exports={encode:c,escape:c,decode:u,unescape:u,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function r(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(r,{})}},{}]},{},[4]);var zu=ju,Vu=n(231),Wu=n(77);var Gu=n(235),qu=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ku=function(e,t){return function(n,r){t(n,r,e)}},Yu=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$c.b;return Object(Y.a)(this,n),(i=t.call(this))._editor=e,i._modeService=r,i._openerService=o,i._onDidRenderCodeBlock=i._register(new en.a),i.onDidRenderCodeBlock=i._onDidRenderCodeBlock.event,i}return Object($.a)(n,[{key:"getOptions",value:function(e){var t=this;return{codeBlockRenderer:function(e,n){var r=null;if(e)r=t._modeService.getModeIdForLanguageName(e);else{var i=t._editor.getModel();i&&(r=i.getLanguageIdentifier().language)}return t._modeService.triggerMode(r||""),Promise.resolve(!0).then((function(e){var t=vt.C.getPromise(r||"");return t?t.then((function(e){return Object(Gu.b)(n,e)})):Object(Gu.b)(n,void 0)})).then((function(e){return'').concat(e,"")}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(e,{fromUserGesture:!0}).catch(ie.e)},disposeables:e}}}},{key:"render",value:function(e){var t=new we.b;return{element:e?function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object(Uu.a)(r),a=function(t){var n;try{n=Object(Vu.a)(decodeURIComponent(t))}catch(r){}return n?(n=Object(vs.b)(n,(function(t){return e.uris&&e.uris[t]?gt.a.revive(e.uris[t]):void 0})),encodeURIComponent(JSON.stringify(n))):t},s=function(t,n){var r=e.uris&&e.uris[t];if(!r)return t;var i=gt.a.revive(r);return gt.a.parse(t).toString()===i.toString()?t:n?zt.asDomUri(i).toString(!0):(i.query&&(i=i.with({query:a(i.query)})),i.toString())},l=new Promise((function(e){return n=e})),c=new Hu.Renderer;c.image=function(e,t,n){var i=[],o=[];if(e){var a=de(e);e=a.href,i=a.dimensions,e=s(e,!0);try{var l=gt.a.parse(e);r.baseUrl&&l.scheme===pl.b.file&&(e=Object(gn.k)(r.baseUrl,e).toString())}catch(c){}o.push('src="'.concat(e,'"'))}return n&&o.push('alt="'.concat(n,'"')),t&&o.push('title="'.concat(t,'"')),i.length&&(o=o.concat(i)),""},c.link=function(t,n,i){return t===i&&(i=ue(i)),t=s(t,!1),r.baseUrl&&(/^\w[\w\d+.-]*:/.test(t)||(t=Object(gn.k)(r.baseUrl,t).toString())),n=ue(n),!(t=ue(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?i:(t=t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),'').concat(i,""))},c.paragraph=function(t){return"

".concat(e.supportThemeIcons?Object(re.f)(t):t,"

")},r.codeBlockRenderer&&(c.code=function(e,t){var n=r.codeBlockRenderer(t,e),i=Cs.b.nextId(),a=Promise.all([n,l]).then((function(e){var t=e[0],n=o.querySelector('div[data-code="'.concat(i,'"]'));n&&(n.innerHTML=t)})).catch((function(e){}));return r.codeBlockRenderCallback&&a.then(r.codeBlockRenderCallback),'
').concat(Object(ht.u)(e),"
")});var u=r.actionHandler;u&&[zt.EventType.CLICK,zt.EventType.AUXCLICK].forEach((function(e){u.disposeables.add(zt.addDisposableListener(o,e,(function(e){var t=new Wu.a(e);if(t.leftButton||t.middleButton){var n=t.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName)try{var r=n.dataset.href;r&&u.callback(r,t)}catch(i){Object(ie.e)(i)}finally{t.preventDefault()}}})))})),i.sanitizer=function(t){return(e.isTrusted?t.match(/^()|(<\/\s*span>)$/):void 0)?t:""},i.sanitize=!0,i.renderer=c;var d=[pl.b.http,pl.b.https,pl.b.mailto,pl.b.data,pl.b.file,pl.b.vscodeRemote,pl.b.vscodeRemoteResource];e.isTrusted&&d.push(pl.b.command);var h=null!==(t=e.value)&&void 0!==t?t:"";h.length>1e5&&(h="".concat(h.substr(0,1e5),"\u2026"));var f=Hu.parse(e.supportThemeIcons?Object(re.d)(h):h,i);function p(t){return"span"!==t.tag||!e.isTrusted||1!==Object.keys(t.attrs).length||(t.attrs.style?!!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!!t.attrs.class&&!!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-animation-[a-z\-]+)?$/))}return o.innerHTML=zu(f,{allowedSchemes:d,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:p}),n(),o}(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return t.dispose()}}}}]),n}(we.a);Yu=qu([Ku(1,Pc.a),Ku(2,Object(Ht.d)($c.a))],Yu);var $u=zt.$,Qu=function e(t,n,r){Object(Y.a)(this,e),this.range=t,this.color=n,this.provider=r},Zu=function e(t,n){Object(Y.a)(this,e),this.range=t,this.marker=n},Xu=function(){function e(t,n){Object(Y.a)(this,e),this._markerDecorationsService=n,this._editor=t,this._result=[]}return Object($.a)(e,[{key:"setRange",value:function(e){this._range=e,this._result=[]}},{key:"clearResult",value:function(){this._result=[]}},{key:"computeAsync",value:function(e){if(!this._editor.hasModel()||!this._range)return Promise.resolve([]);var t=this._editor.getModel();return vt.p.has(t)?Iu(t,new Oe.a(this._range.startLineNumber,this._range.startColumn),e):Promise.resolve([])}},{key:"computeSync",value:function(){var e=this;if(!this._editor.hasModel()||!this._range)return[];var t=this._editor.getModel(),n=this._range.startLineNumber;if(n>this._editor.getModel().getLineCount())return[];var r=sr.get(this._editor),i=t.getLineMaxColumn(n),o=this._editor.getLineDecorations(n),a=!1,s=this._range,l=o.map((function(o){var l=o.range.startLineNumber===n?o.range.startColumn:1,c=o.range.endLineNumber===n?o.range.endColumn:i;if(l>s.startColumn||s.endColumn>c)return null;var u=new Te.a(s.startLineNumber,l,s.startLineNumber,c),d=e._markerDecorationsService.getMarker(t,o);if(d)return new Zu(u,d);var h=r.getColorData(o.range.getStartPosition());if(!a&&h){a=!0;var f=h.colorInfo,p=f.color,g=f.range;return new Qu(g,p,h.provider)}return ae(o.options.hoverMessage)?null:{contents:o.options.hoverMessage?Object(ne.b)(o.options.hoverMessage):[],range:u}}));return Object(ne.d)(l)}},{key:"onResult",value:function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof Qu?-1:t instanceof Qu?1:0}))):this._result.concat(e)}},{key:"getResult",value:function(){return this._result.slice(0)}},{key:"getResultWithLoadingMessage",value:function(){return this._result.slice(0).concat([this._getLoadingMessage()])}},{key:"_getLoadingMessage",value:function(){return{range:this._range,contents:[(new oe).appendText(Z.a("modesContentHover.loading","Loading..."))]}}}]),e}(),Ju={type:2,filter:{include:bt.QuickFix}},ed=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s){var l,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:$c.b;return Object(Y.a)(this,n),(l=t.call(this,n.ID,e,r,o))._themeService=a,l._modeService=s,l._openerService=c,l.renderDisposable=l._register(new we.d),l._messages=[],l._lastRange=null,l._computer=new Xu(l._editor,i),l._highlightDecorations=[],l._isChangingDecorations=!1,l._shouldFocus=!1,l._colorPicker=null,l._hoverOperation=new Ru(l._computer,(function(e){return l._withResult(e,!0)}),null,(function(e){return l._withResult(e,!1)}),l._editor.getOption(46).delay),l._register(zt.addStandardDisposableListener(l.getDomNode(),zt.EventType.FOCUS,(function(){l._colorPicker&&zt.addClass(l.getDomNode(),"colorpicker-hover")}))),l._register(zt.addStandardDisposableListener(l.getDomNode(),zt.EventType.BLUR,(function(){zt.removeClass(l.getDomNode(),"colorpicker-hover")}))),l._register(e.onDidChangeConfiguration((function(e){l._hoverOperation.setHoverTime(l._editor.getOption(46).delay)}))),l._register(vt.C.onDidChange((function(e){l.isVisible&&l._lastRange&&l._messages.length>0&&(l._hover.contentsDomNode.textContent="",l._renderMessages(l._lastRange,l._messages))}))),l}return Object($.a)(n,[{key:"dispose",value:function(){this._hoverOperation.cancel(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"onModelDecorationsChanged",value:function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}},{key:"startShowingAt",value:function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){for(var r=[],i=0,o=this._messages.length;i=e.endColumn&&r.push(a)}if(r.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()}},{key:"_renderMessages",value:function(e,t){var r=this;this.renderDisposable.dispose(),this._colorPicker=null;var i=1073741824,o=t[0].range?Te.a.lift(t[0].range):null,a=document.createDocumentFragment(),s=!0,l=!1,c=new we.b,u=[];if(t.forEach((function(e){if(e.range)if(i=Math.min(i,e.range.startColumn),o=o?Te.a.plusRange(o,e.range):Te.a.lift(e.range),e instanceof Qu){l=!0;var t=e.color,n=t.red,d=t.green,h=t.blue,f=t.alpha,p=new nr.c(Math.round(255*n),Math.round(255*d),Math.round(255*h),f),g=new nr.a(p);if(!r._editor.hasModel())return;var m=r._editor.getModel(),v=new Te.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),_={range:e.range,color:e.color},b=new Eu(g,[],0),y=new Au(a,b,r._editor.getOption(115),r._themeService);rr(m,_,e.provider,pt.a.None).then((function(t){if(b.colorPresentations=t||[],r._editor.hasModel()){var n=r._editor.getModel().getValueInRange(e.range);b.guessColorPresentation(g,n);var i=function(){var e,t;b.presentation.textEdit?(e=[b.presentation.textEdit],t=(t=new Te.a(b.presentation.textEdit.range.startLineNumber,b.presentation.textEdit.range.startColumn,b.presentation.textEdit.range.endLineNumber,b.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+b.presentation.textEdit.text.length)):(e=[{identifier:null,range:v,text:b.presentation.label,forceMoveMarkers:!1}],t=v.setEndPosition(v.endLineNumber,v.startColumn+b.presentation.label.length)),r._editor.pushUndoStop(),r._editor.executeEdits("colorpicker",e),b.presentation.additionalTextEdits&&(e=Object(ct.a)(b.presentation.additionalTextEdits),r._editor.executeEdits("colorpicker",e),r.hide()),r._editor.pushUndoStop(),v=t},o=function(t){return rr(m,{range:v,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},e.provider,pt.a.None).then((function(e){b.colorPresentations=e||[]}))},s=b.onColorFlushed((function(e){o(e).then(i)})),l=b.onDidChangeColor(o);r._colorPicker=y,r.showAt(v.getStartPosition(),v,r._shouldFocus),r.updateContents(a),r._colorPicker.layout(),r.renderDisposable.value=Object(we.e)(s,l,y,c)}}))}else e instanceof Zu?(u.push(e),s=!1):e.contents.filter((function(e){return!ae(e)})).forEach((function(e){var t=$u("div.hover-row.markdown-hover"),n=zt.append(t,$u("div.hover-contents")),i=c.add(new Yu(r._editor,r._modeService,r._openerService));c.add(i.onDidRenderCodeBlock((function(){n.className="hover-contents code-hover-contents",r._hover.onContentsChanged()})));var o=c.add(i.render(e));n.appendChild(o.element),a.appendChild(t),s=!1}))})),u.length){u.forEach((function(e){return a.appendChild(r.renderMarkerHover(e))}));var d=1===u.length?u[0]:u.sort((function(e,t){return hn.c.compare(e.marker.severity,t.marker.severity)}))[0];a.appendChild(this.renderMarkerStatusbar(d))}l||s||(this.showAt(new Oe.a(e.startLineNumber,i),o,this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,o?[{range:o,options:n._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}},{key:"renderMarkerHover",value:function(e){var t=this,n=$u("div.hover-row"),r=zt.append(n,$u("div.marker.hover-contents")),i=e.marker,o=i.source,a=i.message,s=i.code,l=i.relatedInformation;this._editor.applyFontInfo(r);var c=zt.append(r,$u("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=a,o||s)if(s&&"string"!==typeof s){var u=$u("span");if(o)zt.append(u,$u("span")).innerText=o;this._codeLink=zt.append(u,$u("a.code-link")),this._codeLink.setAttribute("href",s.target.toString()),this._codeLink.onclick=function(e){t._openerService.open(s.target),e.preventDefault(),e.stopPropagation()},zt.append(this._codeLink,$u("span")).innerText=s.value;var d=zt.append(r,u);d.style.opacity="0.6",d.style.paddingLeft="6px"}else{var h=zt.append(r,$u("span"));h.style.opacity="0.6",h.style.paddingLeft="6px",h.innerText=o&&s?"".concat(o,"(").concat(s,")"):o||"(".concat(s,")")}if(Object(ne.o)(l)){var f,p=Object(Ce.a)(l);try{var g=function(){var e=f.value,n=e.message,i=e.resource,o=e.startLineNumber,a=e.startColumn,s=zt.append(r,$u("div"));s.style.marginTop="8px";var l=zt.append(s,$u("a"));l.innerText="".concat(Object(gn.b)(i),"(").concat(o,", ").concat(a,"): "),l.style.cursor="pointer",l.onclick=function(e){e.stopPropagation(),e.preventDefault(),t._openerService&&t._openerService.open(i.with({fragment:"".concat(o,",").concat(a)}),{fromUserGesture:!0}).catch(ie.e)};var c=zt.append(s,$u("span"));c.innerText=n,t._editor.applyFontInfo(c)};for(p.s();!(f=p.n()).done;)g()}catch(m){p.e(m)}finally{p.f()}}return n}},{key:"renderMarkerStatusbar",value:function(e){var t=this,n=$u("div.hover-row.status-bar"),r=new we.b,i=zt.append(n,$u("div.actions"));if(e.marker.severity!==hn.c.Error&&e.marker.severity!==hn.c.Warning&&e.marker.severity!==hn.c.Info||r.add(this._renderAction(i,{label:Z.a("peek problem","Peek Problem"),commandId:_u.ID,run:function(){t.hide(),mu.get(t._editor).showAtMarker(e.marker),t._editor.focus()}})),!this._editor.getOption(72)){var o=zt.append(i,$u("div"));o.style.opacity="0",o.style.transition="opacity 0.2s",setTimeout((function(){return o.style.opacity="1"}),200),o.textContent=Z.a("checkingForQuickFixes","Checking for quick fixes..."),r.add(Object(we.h)((function(){return o.remove()})));var a=this.getCodeActions(e.marker);r.add(Object(we.h)((function(){return a.cancel()}))),a.then((function(e){if(o.style.transition="",o.style.opacity="1",!e.validActions.length)return e.dispose(),void(o.textContent=Z.a("noQuickFixes","No quick fixes available"));o.remove();var n=!1;r.add(Object(we.h)((function(){n||e.dispose()}))),r.add(t._renderAction(i,{label:Z.a("quick fixes","Quick Fix..."),commandId:xn.Id,run:function(r){n=!0;var i=En.get(t._editor),o=zt.getDomNodePagePosition(r);t.hide(),i.showCodeActions(Ju,e,{x:o.left+6,y:o.top+o.height+6})}}))}))}return this.renderDisposable.value=r,n}},{key:"getCodeActions",value:function(e){var t=this;return Object(Ee.f)((function(n){return At(t._editor.getModel(),new Te.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Ju,kt.b.None,n)}))}}]),n}(Fu);ed.ID="editor.contrib.modesContentHoverWidget",ed._DECORATION_OPTIONS=Ne.a.register({className:"hoverHighlight"}),Object(Ae.g)((function(e,t){var n=e.getColor(Le.rc);n&&t.addRule(".monaco-hover .hover-contents a.code-link span:hover { color: ".concat(n,"; }"))}));var td=function(){function e(t){Object(Y.a)(this,e),this._editor=t,this._lineNumber=-1,this._result=[]}return Object($.a)(e,[{key:"setLineNumber",value:function(e){this._lineNumber=e,this._result=[]}},{key:"clearResult",value:function(){this._result=[]}},{key:"computeSync",value:function(){var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;var r,i=Object(Ce.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.options.glyphMarginClassName){var a=o.options.glyphMarginHoverMessage;a&&!ae(a)&&n.push.apply(n,Object(ct.a)(Object(ne.b)(a).map(e)))}}}catch(s){i.e(s)}finally{i.f()}return n}},{key:"onResult",value:function(e,t){this._result=this._result.concat(e)}},{key:"getResult",value:function(){return this._result}},{key:"getResultWithLoadingMessage",value:function(){return this.getResult()}}]),e}(),nd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$c.b;return Object(Y.a)(this,n),(i=t.call(this,n.ID,e))._renderDisposeables=i._register(new we.b),i._messages=[],i._lastLineNumber=-1,i._markdownRenderer=i._register(new Yu(i._editor,r,o)),i._computer=new td(i._editor),i._hoverOperation=new Ru(i._computer,(function(e){return i._withResult(e)}),void 0,(function(e){return i._withResult(e)}),300),i}return Object($.a)(n,[{key:"dispose",value:function(){this._hoverOperation.cancel(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"onModelDecorationsChanged",value:function(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}},{key:"startShowingAt",value:function(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}},{key:"hide",value:function(){this._lastLineNumber=-1,this._hoverOperation.cancel(),Object(Rt.a)(Object(Mt.a)(n.prototype),"hide",this).call(this)}},{key:"_withResult",value:function(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}},{key:"_renderMessages",value:function(e,t){this._renderDisposeables.clear();var n,r=document.createDocumentFragment(),i=Object(Ce.a)(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=this._markdownRenderer.render(o.value);this._renderDisposeables.add(a),r.appendChild(Object(zt.$)("div.hover-row",void 0,a.element))}}catch(s){i.e(s)}finally{i.f()}this.updateContents(r),this.showAt(e)}}]),n}(Bu);nd.ID="editor.contrib.modesGlyphHoverWidget";var rd=n(274),id=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},od=function(e,t){return function(n,r){t(n,r,e)}},ad=function(){function e(t,n,r,i,o,a,s){var l=this;Object(Y.a)(this,e),this._editor=t,this._openerService=n,this._modeService=r,this._markerDecorationsService=i,this._keybindingService=o,this._themeService=a,this._toUnhook=new we.b,this._contentWidget=new we.d,this._glyphWidget=new we.d,this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.hasChanged(46)&&(l._hideWidgets(),l._unhookEvents(),l._hookEvents())})),this._hoverVisibleKey=X.a.hoverVisible.bindTo(s)}return Object($.a)(e,[{key:"_hookEvents",value:function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getOption(46);this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.add(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.add(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):(this._toUnhook.add(this._editor.onMouseMove(t)),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)})))),this._toUnhook.add(this._editor.onMouseLeave(t)),this._toUnhook.add(this._editor.onDidChangeModel(t)),this._toUnhook.add(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))}},{key:"_unhookEvents",value:function(){this._toUnhook.clear()}},{key:"_onModelDecorationsChanged",value:function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()}},{key:"_onEditorScrollChanged",value:function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}},{key:"_onEditorMouseDown",value:function(e){this._isMouseDown=!0;var t=e.target.type;9!==t||e.target.detail!==ed.ID?12===t&&e.target.detail===nd.ID||(12!==t&&e.target.detail!==nd.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}},{key:"_onEditorMouseUp",value:function(e){this._isMouseDown=!1}},{key:"_onEditorMouseMove",value:function(e){var t=e.target.type;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||9!==t||e.target.detail!==ed.ID)&&(!this._isHoverSticky||12!==t||e.target.detail!==nd.ID)){if(7===t){var n=this._editor.getOption(36).typicalHalfwidthCharacterWidth/2,r=e.target.detail;r&&!r.isAfterLines&&"number"===typeof r.horizontalDistanceToText&&r.horizontalDistanceToTextn-1)return[];var a,s=e.getOptions(),l=s.tabSize,c=s.indentSize,u=s.insertSpaces,d=function(e,t){return t=t||1,cd.a.shiftIndent(e,e.length+t,l,c,u)},h=function(e,t){return t=t||1,cd.a.unshiftIndent(e,e.length+t,l,c,u)},f=[],p=e.getLineContent(t),g=p;if(void 0!==r&&null!==r){a=r;var m=ht.z(p);g=a+p.substring(m.length),i.decreaseIndentPattern&&i.decreaseIndentPattern.test(g)&&(g=(a=h(a))+p.substring(m.length)),p!==g&&f.push(lr.a.replace(new J.a(t,1,t,m.length+1),Ne.b.normalizeIndentation(a,c,u)))}else a=ht.z(p);var v=a;i.increaseIndentPattern&&i.increaseIndentPattern.test(g)?(v=d(v),a=d(a)):i.indentNextLinePattern&&i.indentNextLinePattern.test(g)&&(v=d(v));for(var _=++t;_<=n;_++){var b=e.getLineContent(_),y=ht.z(b),S=v+b.substring(y.length);i.decreaseIndentPattern&&i.decreaseIndentPattern.test(S)&&(v=h(v),a=h(a)),y!==v&&f.push(lr.a.replace(new J.a(_,1,_,y.length+1),Ne.b.normalizeIndentation(v,c,u))),i.unIndentedLinePattern&&i.unIndentedLinePattern.test(b)||(v=i.increaseIndentPattern&&i.increaseIndentPattern.test(S)?a=d(a):i.indentNextLinePattern&&i.indentNextLinePattern.test(S)?d(v):a)}return f}var fd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Z.a("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:X.a.writable})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=n.getOptions(),i=t.getSelection();if(i){var o=new Ed(i,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}}}]),n}(Q.b);fd.ID="editor.action.indentationToSpaces";var pd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Z.a("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:X.a.writable})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=n.getOptions(),i=t.getSelection();if(i){var o=new wd(i,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}}}]),n}(Q.b);pd.ID="editor.action.indentationToTabs";var gd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r)).insertSpaces=e,i}return Object($.a)(n,[{key:"run",value:function(e,t){var n=this,r=e.get(Zn.a),i=e.get(_t.a),o=t.getModel();if(o){var a=i.getCreationOptions(o.getLanguageIdentifier().language,o.uri,o.isForSimpleWidget),s=[1,2,3,4,5,6,7,8].map((function(e){return{id:e.toString(),label:e.toString(),description:e===a.tabSize?Z.a("configuredTabSize","Configured Tab Size"):void 0}})),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((function(){r.pick(s,{placeHolder:Z.a({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[l]}).then((function(e){e&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:n.insertSpaces})}))}),50)}}}]),n}(Q.b),md=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,{id:n.ID,label:Z.a("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}return n}(gd);md.ID="editor.action.indentUsingTabs";var vd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,{id:n.ID,label:Z.a("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}return n}(gd);vd.ID="editor.action.indentUsingSpaces";var _d=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Z.a("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=e.get(_t.a),r=t.getModel();if(r){var i=n.getCreationOptions(r.getLanguageIdentifier().language,r.uri,r.isForSimpleWidget);r.detectIndentation(i.insertSpaces,i.tabSize)}}}]),n}(Q.b);_d.ID="editor.action.detectIndentation";var bd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.reindentlines",label:Z.a("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:X.a.writable})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=hd(n,1,n.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}}]),n}(Q.b),yd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.reindentselectedlines",label:Z.a("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:X.a.writable})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=t.getSelections();if(null!==r){var i,o=[],a=Object(Ce.a)(r);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=s.startLineNumber,c=s.endLineNumber;if(l!==c&&1===s.endColumn&&c--,1===l){if(l===c)continue}else l--;var u=hd(n,l,c);o.push.apply(o,Object(ct.a)(u))}}catch(d){a.e(d)}finally{a.f()}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}}}]),n}(Q.b),Sd=function(){function e(t,n){Object(Y.a)(this,e),this._initialSelection=n,this._edits=[],this._selectionId=null;var r,i=Object(Ce.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.range&&"string"===typeof o.text&&this._edits.push(o)}}catch(a){i.e(a)}finally{i.f()}}return Object($.a)(e,[{key:"getEditOperations",value:function(e,t){var n,r=Object(Ce.a)(this._edits);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.addEditOperation(Te.a.lift(i.range),i.text)}}catch(a){r.e(a)}finally{r.f()}var o=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(o=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(o=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),o||(this._selectionId=t.trackSelection(this._initialSelection))}},{key:"computeCursorState",value:function(e,t){return t.getTrackedSelection(this._selectionId)}}]),e}(),Cd=function(){function e(t){var n=this;Object(Y.a)(this,e),this.callOnDispose=new we.b,this.callOnModel=new we.b,this.editor=t,this.callOnDispose.add(t.onDidChangeConfiguration((function(){return n.update()}))),this.callOnDispose.add(t.onDidChangeModel((function(){return n.update()}))),this.callOnDispose.add(t.onDidChangeModelLanguage((function(){return n.update()})))}return Object($.a)(e,[{key:"update",value:function(){var e=this;this.callOnModel.clear(),this.editor.getOption(8)<4||this.editor.getOption(40)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((function(t){var n=t.range;e.trigger(n)})))}},{key:"trigger",value:function(e){var t=this.editor.getSelections();if(!(null===t||t.length>1)){var n=this.editor.getModel();if(n&&n.isCheapToTokenize(e.getStartPosition().lineNumber)){var r=this.editor.getOption(8),i=n.getOptions(),o=i.tabSize,a=i.indentSize,s=i.insertSpaces;this.editor.pushUndoStop();for(var l=[],c={shiftIndent:function(e){return cd.a.shiftIndent(e,e.length+1,o,a,s)},unshiftIndent:function(e){return cd.a.unshiftIndent(e,e.length+1,o,a,s)}},u=e.startLineNumber;u<=e.endLineNumber&&this.shouldIgnoreLine(n,u);)u++;if(!(u>e.endLineNumber)){var d=n.getLineContent(u);if(!/\S/.test(d.substring(0,e.startColumn-1))){var h=cr.a.getGoodIndentForLine(r,n,n.getLanguageIdentifier().id,u,c);if(null!==h){var f=ht.z(d),p=ud(h,o);if(p!==ud(f,o)){var g=dd(p,o,s);l.push({range:new Te.a(u,1,u,f.length+1),text:g}),d=g+d.substr(f.length)}else{var m=cr.a.getIndentMetadata(n,u);if(0===m||8===m)return}}}for(var v=u;u0){var i=r.findTokenIndexAtOffset(n);if(i>=0&&1===r.getStandardTokenType(i))return!0}return!1}},{key:"dispose",value:function(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}]),e}();function kd(e,t,n,r){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){for(var i="",o=0;o=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},xd=function(e,t){return function(n,r){t(n,r,e)}},Nd=function(){function e(t,n){Object(Y.a)(this,e),this.decorationIds=[],this.editor=t,this.editorWorkerService=n}return Object($.a)(e,[{key:"dispose",value:function(){}},{key:"run",value:function(t,n){var r=this;this.currentRequest&&this.currentRequest.cancel();var i=this.editor.getSelection(),o=this.editor.getModel();if(o&&i){var a=i;if(a.startLineNumber===a.endLineNumber){var s=new mt.a(this.editor,5),l=o.uri;return this.editorWorkerService.canNavigateValueSet(l)?(this.currentRequest=Object(Ee.f)((function(e){return r.editorWorkerService.navigateValueSet(l,a,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&s.validate(r.editor)){var i=Te.a.lift(n.range),o=n.range,l=n.value.length-(a.endColumn-a.startColumn);o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.startColumn+n.value.length},l>1&&(a=new J.a(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+l-1));var c=new Od(i,a,n.value);r.editor.pushUndoStop(),r.editor.executeCommand(t,c),r.editor.pushUndoStop(),r.decorationIds=r.editor.deltaDecorations(r.decorationIds,[{range:o,options:e.DECORATION}]),r.decorationRemover&&r.decorationRemover.cancel(),r.decorationRemover=Object(Ee.l)(350),r.decorationRemover.then((function(){return r.decorationIds=r.editor.deltaDecorations(r.decorationIds,[])})).catch(ie.e)}})).catch(ie.e)):Promise.resolve(void 0)}}}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Nd.ID="editor.contrib.inPlaceReplaceController",Nd.DECORATION=Ne.a.register({className:"valueSetReplacement"}),Nd=Td([xd(1,Pa.a)],Nd);var Dd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inPlaceReplace.up",label:Z.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3154,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=Nd.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}]),n}(Q.b),Ld=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inPlaceReplace.down",label:Z.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3156,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=Nd.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}]),n}(Q.b);Object(Q.m)(Nd.ID,Nd),Object(Q.k)(Dd),Object(Q.k)(Ld),Object(Ae.g)((function(e,t){var n=e.getColor(De.d);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px ".concat(n,"; }"))}));var Ad=function(){function e(t,n){Object(Y.a)(this,e),this._selection=t,this._cursors=n,this._selectionId=null}return Object($.a)(e,[{key:"getEditOperations",value:function(e,t){for(var n=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var n=t.length-2;n>=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var r=[],i=0,o=0,a=t.length,s=1,l=e.getLineCount();s<=l;s++){var c=e.getLineContent(s),u=c.length+1,d=0;if(!(o=r.startLineNumber+1&&t<=r.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var C=cr.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(h,1),r.startLineNumber+1,l);if(null!==C){var k=ht.z(e.getLineContent(r.startLineNumber)),E=ud(C,o),w=ud(k,o);if(E!==w){var O=E-w;this.getIndentEditsOfMovingBlock(e,t,r,o,s,O)}}}}else t.addEditOperation(new Te.a(r.startLineNumber,1,r.startLineNumber,1),p+"\n")}else if(h=r.startLineNumber-1,f=e.getLineContent(h),t.addEditOperation(new Te.a(h,1,h+1,1),null),t.addEditOperation(new Te.a(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),"\n"+f),this.shouldAutoIndent(e,r)){c.getLineContent=function(t){return t===h?e.getLineContent(r.startLineNumber):e.getLineContent(t)};var T=this.matchEnterRule(e,l,o,r.startLineNumber,r.startLineNumber-2);if(null!==T)0!==T&&this.getIndentEditsOfMovingBlock(e,t,r,o,s,T);else{var x=cr.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),h,l);if(null!==x){var N=ht.z(e.getLineContent(r.startLineNumber)),D=ud(x,o),L=ud(N,o);if(D!==L){var A=D-L;this.getIndentEditsOfMovingBlock(e,t,r,o,s,A)}}}}}this._selectionId=t.trackSelection(r)}else this._selectionId=t.trackSelection(this._selection)}},{key:"buildIndentConverter",value:function(e,t,n){return{shiftIndent:function(r){return cd.a.shiftIndent(r,r.length+1,e,t,n)},unshiftIndent:function(r){return cd.a.unshiftIndent(r,r.length+1,e,t,n)}}}},{key:"matchEnterRule",value:function(e,t,n,r,i,o){for(var a=i;a>=1;){var s=void 0;if(s=a===i&&void 0!==o?o:e.getLineContent(a),ht.J(s)>=0)break;a--}if(a<1||r>e.getLineCount())return null;var l=e.getLineMaxColumn(a),c=cr.a.getEnterAction(this._autoIndent,e,new Te.a(a,l,a,l));if(c){var u=c.indentation;c.indentAction===Md.a.None||c.indentAction===Md.a.Indent?u=c.indentation+c.appendText:c.indentAction===Md.a.IndentOutdent?u=c.indentation:c.indentAction===Md.a.Outdent&&(u=t.unshiftIndent(c.indentation)+c.appendText);var d=e.getLineContent(r);if(this.trimLeft(d).indexOf(this.trimLeft(u))>=0){var h=ht.z(e.getLineContent(r)),f=ht.z(u),p=cr.a.getIndentMetadata(e,r);return null!==p&&2&p&&(f=t.unshiftIndent(f)),ud(f,n)-ud(h,n)}}return null}},{key:"trimLeft",value:function(e){return e.replace(/^\s+/,"")}},{key:"shouldAutoIndent",value:function(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==cr.a.getIndentRulesSupport(n)}},{key:"getIndentEditsOfMovingBlock",value:function(e,t,n,r,i,o){for(var a=n.startLineNumber;a<=n.endLineNumber;a++){var s=e.getLineContent(a),l=ht.z(s),c=dd(ud(l,r)+o,r,i);c!==l&&(t.addEditOperation(new Te.a(a,1,a,l.length+1),c),a===n.endLineNumber&&n.endColumn<=l.length+1&&""===c&&(this._moveEndLineSelectionShrink=!0))}}},{key:"computeCursorState",value:function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=i)return null;for(var o=[],a=r;a<=i;a++)o.push(e.getLineContent(a));var s=o.slice(0);return s.sort(jd.getCollator().compare),!0===n&&(s=s.reverse()),{startLineNumber:r,endLineNumber:i,before:o,after:s}}jd._COLLATOR=null;var Bd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r)).down=e,i}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n=t.getSelections().map((function(e,t){return{selection:e,index:t,ignore:!1}}));n.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.selection,t.selection)}));for(var r=n[0],i=1;i1&&(u-=1,h=r.getLineMaxColumn(u)),o.push(lr.a.replace(new J.a(u,h,d,f),"")),a.push(new J.a(u-i,c.positionColumn,u-i,c.positionColumn)),i+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}}}},{key:"_getLinesToRemove",value:function(e){var t=e.getSelections().map((function(e){var t=e.endLineNumber;return e.startLineNumber=t[i].startLineNumber?r.endLineNumber=t[i].endLineNumber:(n.push(r),r=t[i]);return n.push(r),n}}]),n}(Q.b),Zd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.indentLines",label:Z.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2137,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Id.a.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}]),n}(Q.b),Xd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.outdentLines",label:Z.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2135,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){z.a.Outdent.runEditorCommand(e,t,null)}}]),n}(Q.b),Jd=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertLineBefore",label:Z.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3075,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Id.a.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}]),n}(Q.b),eh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertLineAfter",label:Z.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2051,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Id.a.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}]),n}(Q.b),th=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelection(),r=this._getRangesToDelete(t),i=[],o=0,a=r.length-1;o0){var a=t.startLineNumber-i;o=new J.a(a,t.startColumn,a,t.startColumn)}else o=new J.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);i+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=o:r.push(o)})),n&&r.unshift(n),r}},{key:"_getRangesToDelete",value:function(e){var t=e.getSelections();if(null===t)return[];var n=t,r=e.getModel();return null===r?[]:(n.sort(Te.a.compareRangesUsingStarts),n=n.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:r.getLineContent(t).length+1;return new Te.a(t,n,e.startLineNumber,1)}return new Te.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new Te.a(e.startLineNumber,1,e.endLineNumber,e.endColumn)})))}}]),n}(th),rh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"deleteAllRight",label:Z.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}return Object($.a)(n,[{key:"_getEndCursorState",value:function(e,t){for(var n=null,r=[],i=0,o=t.length;ie.endLineNumber+1?(i.push(e),t):new J.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(i.push(e),t):new J.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));i.push(o);var a=t.getModel();if(null!==a){for(var s=[],l=[],c=r,u=0,d=0,h=i.length;d=1){var E=!0;""===y&&(E=!1),!E||" "!==y.charAt(y.length-1)&&"\t"!==y.charAt(y.length-1)||(E=!1,y=y.replace(/[\s\uFEFF\xA0]+$/g," "));var w=C.substr(k-1);y+=(E?" ":"")+w,g=E?w.length+1:w.length}else g=0}var O=new Te.a(p,1,m,v);if(!O.isEmpty()){var T=void 0;f.isEmpty()?(s.push(lr.a.replace(O,y)),T=new J.a(O.startLineNumber-u,y.length-g+1,p-u,y.length-g+1)):f.startLineNumber===f.endLineNumber?(s.push(lr.a.replace(O,y)),T=new J.a(f.startLineNumber-u,f.startColumn,f.endLineNumber-u,f.endColumn)):(s.push(lr.a.replace(O,y)),T=new J.a(f.startLineNumber-u,f.startColumn,f.startLineNumber-u,y.length-_)),null!==Te.a.intersectRanges(O,r)?c=T:l.push(T)}u+=O.endLineNumber-O.startLineNumber}l.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,s,l),t.pushUndoStop()}}}}}]),n}(Q.b),oh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transpose",label:Z.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:X.a.writable})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getSelections();if(null!==n){var r=t.getModel();if(null!==r){for(var i=[],o=0,a=n.length;o=c){if(l.lineNumber===r.getLineCount())continue;var u=new Te.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d=r.getValueInRange(u).split("").reverse().join("");i.push(new Ve.a(new J.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),d))}else{var h=new Te.a(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),f=r.getValueInRange(h).split("").reverse().join("");i.push(new Ve.b(h,f,new J.a(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}}}]),n}(Q.b),ah=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"run",value:function(e,t){var n=t.getSelections();if(null!==n){var r=t.getModel();if(null!==r){for(var i=t.getOption(105),o=[],a=0,s=n.length;a=0?(i=!0,r+=a):i?(i=!1,r+=a.toLocaleUpperCase()):r+=a.toLocaleLowerCase()}return r}}]),n}(ah);Object(Q.k)(Ud),Object(Q.k)(Hd),Object(Q.k)(zd),Object(Q.k)(Wd),Object(Q.k)(Gd),Object(Q.k)(Kd),Object(Q.k)(Yd),Object(Q.k)($d),Object(Q.k)(Qd),Object(Q.k)(Zd),Object(Q.k)(Xd),Object(Q.k)(Jd),Object(Q.k)(eh),Object(Q.k)(nh),Object(Q.k)(rh),Object(Q.k)(ih),Object(Q.k)(oh),Object(Q.k)(sh),Object(Q.k)(lh),Object(Q.k)(ch);n(502);var uh=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},dh=function(){function e(t,n){Object(Y.a)(this,e),this._link=t,this._provider=n}return Object($.a)(e,[{key:"toJSON",value:function(){return{range:this.range,url:this.url,tooltip:this.tooltip}}},{key:"resolve",value:function(e){return uh(this,void 0,void 0,G.a.mark((function t(){var n=this;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._link.url){t.next=2;break}return t.abrupt("return",this._link.url);case 2:if("function"!==typeof this._provider.resolveLink){t.next=4;break}return t.abrupt("return",Promise.resolve(this._provider.resolveLink(this._link,e)).then((function(t){return n._link=t||n._link,n._link.url?n.resolve(e):Promise.reject(new Error("missing"))})));case 4:return t.abrupt("return",Promise.reject(new Error("missing")));case 5:case"end":return t.stop()}}),t,this)})))}},{key:"range",get:function(){return this._link.range}},{key:"url",get:function(){return this._link.url}},{key:"tooltip",get:function(){return this._link.tooltip}}]),e}(),hh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;Object(Y.a)(this,n),r=t.call(this);var i,o=[],a=Object(Ce.a)(e);try{var s=function(){var e=Object(ke.a)(i.value,2),t=e[0],a=e[1],s=t.links.map((function(e){return new dh(e,a)}));o=n._union(o,s),Object(we.g)(t)&&r._register(t)};for(a.s();!(i=a.n()).done;)s()}catch(l){a.e(l)}finally{a.f()}return r.links=o,r}return Object($.a)(n,null,[{key:"_union",value:function(e,t){var n,r,i,o,a=[];for(n=0,i=0,r=e.length,o=t.length;n1?t-1:0),r=1;r=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},gh=function(e,t){return function(n,r){t(n,r,e)}},mh=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var vh={general:Ne.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Ne.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},_h=function(){function e(t,n){Object(Y.a)(this,e),this.link=t,this.decorationId=n}return Object($.a)(e,[{key:"activate",value:function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!0))}},{key:"deactivate",value:function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!1))}}],[{key:"decoration",value:function(t,n){return{range:t.range,options:e._getOptions(t,n,!1)}}},{key:"_getOptions",value:function(e,t,n){var r=Object.assign({},n?vh.active:vh.general);return r.hoverMessage=function(e,t){var n=e.url&&/^command:/i.test(e.url.toString()),r=e.tooltip?e.tooltip:n?Z.a("links.navigate.executeCmd","Execute command"):Z.a("links.navigate.follow","Follow link"),i=t?Ke.f?Z.a("links.navigate.kb.meta.mac","cmd + click"):Z.a("links.navigate.kb.meta","ctrl + click"):Ke.f?Z.a("links.navigate.kb.alt.mac","option + click"):Z.a("links.navigate.kb.alt","alt + click");return e.url?new oe("",!0).appendMarkdown("[".concat(r,"](").concat(e.url.toString(),") (").concat(i,")")):(new oe).appendText("".concat(r," (").concat(i,")"))}(e,t),r}}]),e}(),bh=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this.listenersToRemove=new we.b,this.editor=t,this.openerService=n,this.notificationService=r;var o=new zc(t);this.listenersToRemove.add(o),this.listenersToRemove.add(o.onMouseMoveOrRelevantKeyDown((function(e){var t=Object(ke.a)(e,2),n=t[0],r=t[1];i._onEditorMouseMove(n,r)}))),this.listenersToRemove.add(o.onExecute((function(e){i.onEditorMouseUp(e)}))),this.listenersToRemove.add(o.onCancel((function(e){i.cleanUpActiveLinkDecoration()}))),this.enabled=t.getOption(54),this.listenersToRemove.add(t.onDidChangeConfiguration((function(e){var n=t.getOption(54);i.enabled!==n&&(i.enabled=n,i.updateDecorations([]),i.stop(),i.beginCompute())}))),this.listenersToRemove.add(t.onDidChangeModelContent((function(e){return i.onChange()}))),this.listenersToRemove.add(t.onDidChangeModel((function(e){return i.onModelChanged()}))),this.listenersToRemove.add(t.onDidChangeModelLanguage((function(e){return i.onModelModeChanged()}))),this.listenersToRemove.add(vt.s.onDidChange((function(e){return i.onModelModeChanged()}))),this.timeout=new Ee.e,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}return Object($.a)(e,[{key:"onModelChanged",value:function(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}},{key:"onModelModeChanged",value:function(){this.stop(),this.beginCompute()}},{key:"onChange",value:function(){var t=this;this.timeout.setIfNotSet((function(){return t.beginCompute()}),e.RECOMPUTE_TIME)}},{key:"beginCompute",value:function(){return mh(this,void 0,void 0,G.a.mark((function e(){var t;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.editor.hasModel()&&this.enabled){e.next=2;break}return e.abrupt("return");case 2:if(t=this.editor.getModel(),vt.s.has(t)){e.next=5;break}return e.abrupt("return");case 5:return this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Ee.f((function(e){return fh(t,e)})),e.prev=7,e.next=10,this.computePromise;case 10:this.activeLinksList=e.sent,this.updateDecorations(this.activeLinksList.links),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),Object(ie.e)(e.t0);case 17:return e.prev=17,this.computePromise=null,e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[7,14,17,20]])})))}},{key:"updateDecorations",value:function(e){for(var t="altKey"===this.editor.getOption(61),n=[],r=Object.keys(this.currentOccurrences),i=0,o=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(this.openerService){var i=e.link;i.resolve(pt.a.None).then((function(e){if("string"===typeof e&&n.editor.hasModel()){var i=n.editor.getModel().uri;if(i.scheme===pl.b.file&&ht.S(e,"file:")){var o=gt.a.parse(e);if(o.scheme===pl.b.file){var a=gn.i(o),s=null;ht.S(a,"/./")?s=".".concat(a.substr(1)):ht.S(a,"//./")&&(s=".".concat(a.substr(2))),s&&(e=gn.g(i,s))}}}return n.openerService.open(e,{openToSide:t,fromUserGesture:r})}),(function(e){var t=e instanceof Error?e.message:e;"invalid"===t?n.notificationService.warn(Z.a("invalid.url","Failed to open this link because it is not well-formed: {0}",i.url.toString())):"missing"===t?n.notificationService.warn(Z.a("missing.url","Failed to open this link because its target is missing.")):Object(ie.e)(e)}))}}},{key:"getLinkOccurrence",value:function(e){if(!this.editor.hasModel()||!e)return null;var t,n=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0),r=Object(Ce.a)(n);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=this.currentOccurrences[i.id];if(o)return o}}catch(a){r.e(a)}finally{r.f()}return null}},{key:"isEnabled",value:function(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}},{key:"stop",value:function(){this.timeout.cancel(),this.activeLinksList&&this.activeLinksList.dispose(),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}},{key:"dispose",value:function(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();bh.ID="editor.linkDetector",bh.RECOMPUTE_TIME=1e3,bh=ph([gh(1,$c.a),gh(2,fn.a)],bh);var yh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.openLink",label:Z.a("label","Open Link"),alias:"Open Link",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=bh.get(t);if(n&&t.hasModel()){var r,i=t.getSelections(),o=Object(Ce.a)(i);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=n.getLinkOccurrence(a.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}catch(l){o.e(l)}finally{o.f()}}}}]),n}(Q.b);Object(Q.m)(bh.ID,bh),Object(Q.k)(yh),Object(Ae.g)((function(e,t){var n=e.getColor(Le.r);n&&t.addRule(".monaco-editor .detected-link-active { color: ".concat(n," !important; }"))}));var Sh=n(91),Ch=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorAbove",label:Z.a("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Ie.b.MenubarSelectionMenu,group:"3_multi",title:Z.a({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){if(t.hasModel()){var r=n&&!0===n.logicalLine,i=t._getViewModel();i.cursorConfig.readOnly||(i.pushStackElement(),i.setCursorStates(n.source,3,Sh.b.addCursorUp(i,i.getCursorStates(),r)),i.revealTopMostCursor(n.source))}}}]),n}(Q.b),kh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorBelow",label:Z.a("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Ie.b.MenubarSelectionMenu,group:"3_multi",title:Z.a({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){if(t.hasModel()){var r=n&&!0===n.logicalLine,i=t._getViewModel();i.cursorConfig.readOnly||(i.pushStackElement(),i.setCursorStates(n.source,3,Sh.b.addCursorDown(i,i.getCursorStates(),r)),i.revealBottomMostCursor(n.source))}}}]),n}(Q.b),Eh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorAtEndOfEachLineSelected",label:Z.a("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Ie.b.MenubarSelectionMenu,group:"3_multi",title:Z.a({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}return Object($.a)(n,[{key:"getCursorsForSelection",value:function(e,t,n){if(!e.isEmpty()){for(var r=e.startLineNumber;r1&&n.push(new J.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}},{key:"run",value:function(e,t){var n=this;if(t.hasModel()){var r=t.getModel(),i=t.getSelections(),o=[];i.forEach((function(e){return n.getCursorsForSelection(e,r,o)})),o.length>0&&t.setSelections(o)}}}]),n}(Q.b),wh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.addCursorsToBottom",label:Z.a("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelections(),r=t.getModel().getLineCount(),i=[],o=n[0].startLineNumber;o<=r;o++)i.push(new J.a(o,n[0].startColumn,o,n[0].endColumn));i.length>0&&t.setSelections(i)}}}]),n}(Q.b),Oh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.addCursorsToTop",label:Z.a("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelections(),r=[],i=n[0].startLineNumber;i>=1;i--)r.push(new J.a(i,n[0].startColumn,i,n[0].endColumn));r.length>0&&t.setSelections(r)}}}]),n}(Q.b),Th=function e(t,n,r){Object(Y.a)(this,e),this.selections=t,this.revealRange=n,this.revealScrollType=r},xh=function(){function e(t,n,r,i,o,a,s){Object(Y.a)(this,e),this._editor=t,this.findController=n,this.isDisconnectedFromFindController=r,this.searchText=i,this.wholeWord=o,this.matchCase=a,this.currentMatch=s}return Object($.a)(e,[{key:"addSelectionToNextFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new Th(t.concat(e),e,0)}},{key:"moveSelectionToNextFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new Th(t.slice(0,t.length-1).concat(e),e,0)}},{key:"_getNextMatch",value:function(){if(!this._editor.hasModel())return null;if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],r=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return r?new J.a(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn):null}},{key:"addSelectionToPreviousFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new Th(t.concat(e),e,0)}},{key:"moveSelectionToPreviousFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new Th(t.slice(0,t.length-1).concat(e),e,0)}},{key:"_getPreviousMatch",value:function(){if(!this._editor.hasModel())return null;if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],r=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1);return r?new J.a(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn):null}},{key:"selectAll",value:function(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(105):null,!1,1073741824)):[]}}],[{key:"create",value:function(t,n){if(!t.hasModel())return null;var r=n.getState();if(!t.hasTextFocus()&&r.isRevealed&&r.searchString.length>0)return new e(t,n,!1,r.searchString,r.wholeWord,r.matchCase,null);var i,o,a=!1,s=t.getSelections();1===s.length&&s[0].isEmpty()?(a=!0,i=!0,o=!0):(i=r.wholeWord,o=r.matchCase);var l,c=t.getSelection(),u=null;if(c.isEmpty()){var d=t.getConfiguredWordAtPosition(c.getStartPosition());if(!d)return null;l=d.word,u=new J.a(c.startLineNumber,d.startColumn,c.startLineNumber,d.endColumn)}else l=t.getModel().getValueInRange(c).replace(/\r\n/g,"\n");return new e(t,n,a,l,i,o,u)}}]),e}(),Nh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._sessionDispose=r._register(new we.b),r._editor=e,r._ignoreSelectionChange=!1,r._session=null,r}return Object($.a)(n,[{key:"dispose",value:function(){this._endSession(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"_beginSessionIfNeeded",value:function(e){var t=this;if(!this._session){var n=xh.create(this._editor,e);if(!n)return;this._session=n;var r={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(r.wholeWordOverride=1,r.matchCaseOverride=1,r.isRegexOverride=2),e.getState().change(r,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((function(){t._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()})))}}},{key:"_endSession",value:function(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1)}this._session=null}},{key:"_setSelections",value:function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}},{key:"_expandEmptyToWord",value:function(e,t){if(!t.isEmpty())return t;var n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new J.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}},{key:"_applySessionResult",value:function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}},{key:"getSession",value:function(e){return this._session}},{key:"addSelectionToNextFindMatch",value:function(e){if(this._editor.hasModel()){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!Bh(this._editor.getModel(),t,n)){for(var r=this._editor.getModel(),i=[],o=0,a=t.length;o0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(105):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(n.searchScope){var r=n.searchScope,i=[];t.forEach((function(e){r.forEach((function(t){e.range.endLineNumber<=t.endLineNumber&&e.range.startLineNumber>=t.startLineNumber&&i.push(e)}))})),t=i}if(t.length>0){for(var o=this._editor.getSelection(),a=0,s=t.length;a=u)a.push(d),s++;else{var h=Te.a.compareRangesUsingStarts(d,o[l]);h<0?(!o[l].isEmpty()&&Te.a.areIntersecting(d,o[l])||a.push(d),s++):(h>0||s++,l++)}}var f=a.map((function(e){return{range:e,options:r?n._SELECTION_HIGHLIGHT:n._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,f)}}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])}},{key:"dispose",value:function(){this._setState(null),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}}],[{key:"_createState",value:function(e,t){if(!e)return null;if(!t.hasModel())return null;var n=t.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;var r=Nh.get(t);if(!r)return null;var i=Eo.get(t);if(!i)return null;var o=r.getSession(i);if(!o){var a=t.getSelections();if(a.length>1){var s=i.getState().matchCase;if(!Bh(t.getModel(),a,s))return null}o=xh.create(t,i)}if(!o)return null;if(o.currentMatch)return null;if(/^[ \t]+$/.test(o.searchText))return null;if(o.searchText.length>200)return null;var l=i.getState(),c=l.matchCase;if(l.isRevealed){var u=l.searchString;c||(u=u.toLowerCase());var d=o.searchText;if(c||(d=d.toLowerCase()),u===d&&o.matchCase===l.matchCase&&o.wholeWord===l.wholeWord&&!l.isRegex)return null}return new jh(o.searchText,o.matchCase,o.wholeWord?t.getOption(105):null,t.getModel().getVersionId())}}]),n}(we.a);function Bh(e,t,n){for(var r=Uh(e,t[0],!n),i=1,o=t.length;i1&&void 0!==arguments[1]?arguments[1]:n.DEFAULT_DELAY;return Object(Y.a)(this,n),(r=t.call(this))._onChangedHints=r._register(new en.a),r.onChangedHints=r._onChangedHints.event,r.triggerOnType=!1,r._state=Wh.Default,r._pendingTriggers=[],r._lastSignatureHelpResult=r._register(new we.d),r.triggerChars=new Ma.b,r.retriggerChars=new Ma.b,r.triggerId=0,r.editor=e,r.throttledDelayer=new Ee.a(i),r._register(r.editor.onDidChangeConfiguration((function(){return r.onEditorConfigurationChange()}))),r._register(r.editor.onDidChangeModel((function(e){return r.onModelChanged()}))),r._register(r.editor.onDidChangeModelLanguage((function(e){return r.onModelChanged()}))),r._register(r.editor.onDidChangeCursorSelection((function(e){return r.onCursorChange(e)}))),r._register(r.editor.onDidChangeModelContent((function(e){return r.onModelContentChange()}))),r._register(vt.y.onDidChange(r.onModelChanged,Object(ut.a)(r))),r._register(r.editor.onDidType((function(e){return r.onDidType(e)}))),r.onEditorConfigurationChange(),r.onModelChanged(),r}return Object($.a)(n,[{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.state=Wh.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}},{key:"trigger",value:function(e,t){var n=this,r=this.editor.getModel();if(r&&vt.y.has(r)){var i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((function(){return n.doTrigger(i)}),t).catch(ie.e)}}},{key:"next",value:function(){if(1===this.state.type){var e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(67).cycle;!(e<2||n)||r?this.updateActiveSignature(n&&r?0:t+1):this.cancel()}}},{key:"previous",value:function(){if(1===this.state.type){var e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=0===t,r=this.editor.getOption(67).cycle;!(e<2||n)||r?this.updateActiveSignature(n&&r?e-1:t-1):this.cancel()}}},{key:"updateActiveSignature",value:function(e){1===this.state.type&&(this.state=new Wh.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}},{key:"doTrigger",value:function(e){return Gh(this,void 0,void 0,G.a.mark((function t(){var n,r,i,o,a,s,l;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=1===this.state.type||2===this.state.type,r=1===this.state.type?this.state.hints:void 0,this.cancel(!0),0!==this._pendingTriggers.length){t.next=5;break}return t.abrupt("return",!1);case 5:if(i=this._pendingTriggers.reduce(Kh),this._pendingTriggers=[],o={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:n,activeSignatureHelp:r},this.editor.hasModel()){t.next=10;break}return t.abrupt("return",!1);case 10:return a=this.editor.getModel(),s=this.editor.getPosition(),this.state=new Wh.Pending(Object(Ee.f)((function(e){return Vh(a,s,o,e)}))),t.prev=13,t.next=16,this.state.request;case 16:if(l=t.sent,e===this.triggerId){t.next=20;break}return null===l||void 0===l||l.dispose(),t.abrupt("return",!1);case 20:if(l&&l.value.signatures&&0!==l.value.signatures.length){t.next=27;break}return null===l||void 0===l||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),t.abrupt("return",!1);case 27:return this.state=new Wh.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),t.abrupt("return",!0);case 31:t.next=38;break;case 33:return t.prev=33,t.t0=t.catch(13),e===this.triggerId&&(this.state=Wh.Default),Object(ie.e)(t.t0),t.abrupt("return",!1);case 38:case"end":return t.stop()}}),t,this,[[13,33]])})))}},{key:"onModelChanged",value:function(){this.cancel(),this.triggerChars=new Ma.b,this.retriggerChars=new Ma.b;var e=this.editor.getModel();if(e){var t,n=Object(Ce.a)(vt.y.ordered(e));try{for(n.s();!(t=n.n()).done;){var r,i=t.value,o=Object(Ce.a)(i.signatureHelpTriggerCharacters||[]);try{for(o.s();!(r=o.n()).done;){var a=r.value;this.triggerChars.add(a.charCodeAt(0)),this.retriggerChars.add(a.charCodeAt(0))}}catch(u){o.e(u)}finally{o.f()}var s,l=Object(Ce.a)(i.signatureHelpRetriggerCharacters||[]);try{for(l.s();!(s=l.n()).done;){var c=s.value;this.retriggerChars.add(c.charCodeAt(0))}}catch(u){l.e(u)}finally{l.f()}}}catch(u){n.e(u)}finally{n.f()}}}},{key:"onDidType",value:function(e){if(this.triggerOnType){var t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:vt.z.TriggerCharacter,triggerCharacter:e.charAt(t)})}}},{key:"onCursorChange",value:function(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:vt.z.ContentChange})}},{key:"onModelContentChange",value:function(){this.isTriggered&&this.trigger({triggerKind:vt.z.ContentChange})}},{key:"onEditorConfigurationChange",value:function(){this.triggerOnType=this.editor.getOption(67).enabled,this.triggerOnType||this.cancel()}},{key:"dispose",value:function(){this.cancel(!0),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"state",get:function(){return this._state},set:function(e){2===this._state.type&&this._state.request.cancel(),this._state=e}},{key:"isTriggered",get:function(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}}]),n}(we.a);function Kh(e,t){switch(t.triggerKind){case vt.z.Invoke:return t;case vt.z.ContentChange:return e;case vt.z.TriggerCharacter:default:return t}}qh.DEFAULT_DELAY=120;var Yh=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},$h=function(e,t){return function(n,r){t(n,r,e)}},Qh=zt.$,Zh=Object(re.e)("parameter-hints-next",re.a.chevronDown),Xh=Object(re.e)("parameter-hints-previous",re.a.chevronUp),Jh=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this)).editor=e,a.renderDisposeables=a._register(new we.b),a.visible=!1,a.announcedLabel=null,a.allowEditorOverflow=!0,a.markdownRenderer=a._register(new Yu(e,o,i)),a.model=a._register(new qh(e)),a.keyVisible=zh.Visible.bindTo(r),a.keyMultipleSignatures=zh.MultipleSignatures.bindTo(r),a._register(a.model.onChangedHints((function(e){e?(a.show(),a.render(e)):a.hide()}))),a}return Object($.a)(n,[{key:"createParamaterHintDOMNodes",value:function(){var e=this,t=Qh(".editor-widget.parameter-hints-widget"),n=zt.append(t,Qh(".wrapper"));n.tabIndex=-1;var r=zt.append(n,Qh(".controls")),i=zt.append(r,Qh(".button"+Xh.cssSelector)),o=zt.append(r,Qh(".overloads")),a=zt.append(r,Qh(".button"+Zh.cssSelector)),s=Object(Ns.b)(Object(Ns.a)(i,"click"));this._register(s(this.previous,this));var l=Object(Ns.b)(Object(Ns.a)(a,"click"));this._register(l(this.next,this));var c=Qh(".body"),u=new Kc.a(c,{});this._register(u),n.appendChild(u.getDomNode());var d=zt.append(c,Qh(".signature")),h=zt.append(c,Qh(".docs"));t.style.userSelect="text",this.domNodes={element:t,signature:d,overloads:o,docs:h,scrollbar:u},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((function(t){e.visible&&e.editor.layoutContentWidget(e)})));var f=function(){if(e.domNodes){var t=e.editor.getOption(36);e.domNodes.element.style.fontSize="".concat(t.fontSize,"px")}};f(),this._register(en.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.hasChanged(36)})).on(f,null)),this._register(this.editor.onDidLayoutChange((function(t){return e.updateMaxHeight()}))),this.updateMaxHeight()}},{key:"show",value:function(){var e=this;this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((function(){e.domNodes&&zt.addClass(e.domNodes.element,"visible")}),100),this.editor.layoutContentWidget(this))}},{key:"hide",value:function(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&zt.removeClass(this.domNodes.element,"visible"),this.editor.layoutContentWidget(this))}},{key:"getPosition",value:function(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}},{key:"render",value:function(e){var t;if(this.renderDisposeables.clear(),this.domNodes){var n=e.signatures.length>1;zt.toggleClass(this.domNodes.element,"multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";var r=e.signatures[e.activeSignature];if(r){var i=zt.append(this.domNodes.signature,Qh(".code")),o=this.editor.getOption(36);i.style.fontSize="".concat(o.fontSize,"px"),i.style.fontFamily=o.fontFamily;var a=r.parameters.length>0,s=null!==(t=r.activeParameter)&&void 0!==t?t:e.activeParameter;if(a)this.renderParameters(i,r,s);else zt.append(i,Qh("span")).textContent=r.label;var l=r.parameters[s];if(null===l||void 0===l?void 0:l.documentation){var c=Qh("span.documentation");if("string"===typeof l.documentation)c.textContent=l.documentation;else{var u=this.renderDisposeables.add(this.markdownRenderer.render(l.documentation));zt.addClass(u.element,"markdown-docs"),c.appendChild(u.element)}zt.append(this.domNodes.docs,Qh("p",{},c))}if(void 0===r.documentation);else if("string"===typeof r.documentation)zt.append(this.domNodes.docs,Qh("p",{},r.documentation));else{var d=this.renderDisposeables.add(this.markdownRenderer.render(r.documentation));zt.addClass(d.element,"markdown-docs"),zt.append(this.domNodes.docs,d.element)}var h=this.hasDocs(r,l);if(zt.toggleClass(this.domNodes.signature,"has-docs",h),zt.toggleClass(this.domNodes.docs,"empty",!h),this.domNodes.overloads.textContent=Object(ht.M)(e.activeSignature+1,e.signatures.length.toString().length)+"/"+e.signatures.length,l){var f=this.getParameterLabel(r,s);this.announcedLabel!==f&&(he.a(Z.a("hint","{0}, hint",f)),this.announcedLabel=f)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}}}},{key:"hasDocs",value:function(e,t){return!!(t&&"string"===typeof t.documentation&&Object(Uo.a)(t.documentation).length>0)||(!!(t&&"object"===typeof t.documentation&&Object(Uo.a)(t.documentation).value.length>0)||(!!(e.documentation&&"string"===typeof e.documentation&&Object(Uo.a)(e.documentation).length>0)||!!(e.documentation&&"object"===typeof e.documentation&&Object(Uo.a)(e.documentation.value).length>0)))}},{key:"renderParameters",value:function(e,t,n){var r=this.getParameterLabelOffsets(t,n),i=Object(ke.a)(r,2),o=i[0],a=i[1],s=document.createElement("span");s.textContent=t.label.substring(0,o);var l=document.createElement("span");l.textContent=t.label.substring(o,a),l.className="parameter active";var c=document.createElement("span");c.textContent=t.label.substring(a),zt.append(e,s,l,c)}},{key:"getParameterLabel",value:function(e,t){var n=e.parameters[t];return Array.isArray(n.label)?e.label.substring(n.label[0],n.label[1]):n.label}},{key:"getParameterLabelOffsets",value:function(e,t){var n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;var r=e.label.lastIndexOf(n.label);return r>=0?[r,r+n.label.length]:[0,0]}return[0,0]}},{key:"next",value:function(){this.editor.focus(),this.model.next()}},{key:"previous",value:function(){this.editor.focus(),this.model.previous()}},{key:"cancel",value:function(){this.model.cancel()}},{key:"getDomNode",value:function(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}},{key:"getId",value:function(){return n.ID}},{key:"trigger",value:function(e){this.model.trigger(e,0)}},{key:"updateMaxHeight",value:function(){if(this.domNodes){var e=Math.max(this.editor.getLayoutInfo().height/4,250),t="".concat(e,"px");this.domNodes.element.style.maxHeight=t;var n=this.domNodes.element.getElementsByClassName("wrapper");n.length&&(n[0].style.maxHeight=t)}}}]),n}(we.a);Jh.ID="editor.widget.parameterHintsWidget",Jh=Yh([$h(1,te.b),$h(2,$c.a),$h(3,Pc.a)],Jh),Object(Ae.g)((function(e,t){var n=e.getColor(Le.F);if(n){var r=e.type===Ae.b?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: ".concat(r,"px solid ").concat(n,"; }")),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ".concat(n.transparent(.5),"; }")),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ".concat(n.transparent(.5),"; }"))}var i=e.getColor(Le.E);i&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: ".concat(i,"; }"));var o=e.getColor(Le.rc);o&&t.addRule(".monaco-editor .parameter-hints-widget a { color: ".concat(o,"; }"));var a=e.getColor(Le.G);a&&t.addRule(".monaco-editor .parameter-hints-widget { color: ".concat(a,"; }"));var s=e.getColor(Le.qc);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: ".concat(s,"; }"))}));var ef=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},tf=function(e,t){return function(n,r){t(n,r,e)}},nf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).editor=e,i.widget=i._register(r.createInstance(Jh,i.editor)),i}return Object($.a)(n,[{key:"cancel",value:function(){this.widget.cancel()}},{key:"previous",value:function(){this.widget.previous()}},{key:"next",value:function(){this.widget.next()}},{key:"trigger",value:function(e){this.widget.trigger(e)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);nf.ID="editor.controller.parameterHints",nf=ef([tf(1,Ht.a)],nf);var rf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.triggerParameterHints",label:Z.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:X.a.hasSignatureHelpProvider,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3082,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=nf.get(t);n&&n.trigger({triggerKind:vt.z.Invoke})}}]),n}(Q.b);Object(Q.m)(nf.ID,nf),Object(Q.k)(rf);var of=Q.c.bindToContribution(nf.get);Object(Q.l)(new of({id:"closeParameterHints",precondition:zh.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object(Q.l)(new of({id:"showPrevParameterHint",precondition:te.a.and(zh.Visible,zh.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object(Q.l)(new of({id:"showNextParameterHint",precondition:te.a.and(zh.Visible,zh.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));n(504);var af=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},sf=function(e,t){return function(n,r){t(n,r,e)}},lf=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},cf=new te.c("onTypeRenameInputVisible",!1),uf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._debounceDuration=200,i._localToDispose=i._register(new we.b),i._editor=e,i._enabled=!1,i._visibleContextKey=cf.bindTo(r),i._currentDecorations=[],i._languageWordPattern=null,i._currentWordPattern=null,i._ignoreChangeEvent=!1,i._localToDispose=i._register(new we.b),i._rangeUpdateTriggerPromise=null,i._rangeSyncTriggerPromise=null,i._currentRequest=null,i._currentRequestPosition=null,i._currentRequestModelVersion=null,i._register(i._editor.onDidChangeModel((function(){return i.reinitialize()}))),i._register(i._editor.onDidChangeConfiguration((function(e){e.hasChanged(73)&&i.reinitialize()}))),i._register(vt.u.onDidChange((function(){return i.reinitialize()}))),i._register(i._editor.onDidChangeModelLanguage((function(){return i.reinitialize()}))),i.reinitialize(),i}return Object($.a)(n,[{key:"reinitialize",value:function(){var e=this,t=this._editor.getModel(),n=null!==t&&this._editor.getOption(73)&&vt.u.has(t);if(n!==this._enabled&&(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),n&&null!==t)){this._languageWordPattern=cr.a.getWordDefinition(t.getLanguageIdentifier().id),this._localToDispose.add(t.onDidChangeLanguageConfiguration((function(){e._languageWordPattern=cr.a.getWordDefinition(t.getLanguageIdentifier().id)})));var r=new Ee.a(this._debounceDuration),i=function(){e._rangeUpdateTriggerPromise=r.trigger((function(){return e.updateRanges()}),e._debounceDuration)},o=new Ee.a(0);this._localToDispose.add(this._editor.onDidChangeCursorPosition((function(){i()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((function(n){if(!e._ignoreChangeEvent&&e._currentDecorations.length>0){var r=t.getDecorationRange(e._currentDecorations[0]);if(r&&n.changes.every((function(e){return r.intersectRanges(e.range)})))return a=e._currentDecorations,void(e._rangeSyncTriggerPromise=o.trigger((function(){return e._syncRanges(a)})))}var a;i()}))),this._localToDispose.add({dispose:function(){r.cancel(),o.cancel()}}),this.updateRanges()}}},{key:"_syncRanges",value:function(e){if(this._editor.hasModel()&&e===this._currentDecorations&&0!==e.length){var t=this._editor.getModel(),n=t.getDecorationRange(e[0]);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();var r=t.getValueInRange(n);if(this._currentWordPattern){var i=r.match(this._currentWordPattern);if((i?i[0].length:0)!==r.length)return this.clearRanges()}for(var o=[],a=1,s=e.length;a0&&void 0!==arguments[0]&&arguments[0];return lf(this,void 0,void 0,G.a.mark((function t(){var r,i,o,a,s,l=this;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()){t.next=3;break}return this.clearRanges(),t.abrupt("return");case 3:if(r=this._editor.getPosition(),!(!this._enabled&&!e||this._editor.getSelections().length>1)){t.next=7;break}return this.clearRanges(),t.abrupt("return");case 7:if(i=this._editor.getModel(),o=i.getVersionId(),!this._currentRequestPosition||this._currentRequestModelVersion!==o){t.next=16;break}if(!r.equals(this._currentRequestPosition)){t.next=12;break}return t.abrupt("return");case 12:if(!(this._currentDecorations&&this._currentDecorations.length>0)){t.next=16;break}if(!(a=i.getDecorationRange(this._currentDecorations[0]))||!a.containsPosition(r)){t.next=16;break}return t.abrupt("return");case 16:return this._currentRequestPosition=r,this._currentRequestModelVersion=o,s=Object(Ee.f)((function(e){return lf(l,void 0,void 0,G.a.mark((function t(){var a,l,c,u,d,h,f;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ff(i,r,e);case 3:if(a=t.sent,s===this._currentRequest){t.next=6;break}return t.abrupt("return");case 6:if(this._currentRequest=null,o===i.getVersionId()){t.next=9;break}return t.abrupt("return");case 9:l=[],(null===a||void 0===a?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(null===a||void 0===a?void 0:a.wordPattern)||this._languageWordPattern,c=!1,u=0,d=l.length;case 14:if(!(u=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},mf=function(e,t){return function(n,r){t(n,r,e)}},vf=new te.c("renameInputVisible",!1),_f=function(){function e(t,n,r,i,o){var a=this;Object(Y.a)(this,e),this._editor=t,this._acceptKeybindings=n,this._themeService=r,this._keybindingService=i,this._disposables=new we.b,this.allowEditorOverflow=!0,this._visibleContextKey=vf.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((function(e){e.hasChanged(36)&&a._updateFont()}))),this._disposables.add(r.onDidColorThemeChange(this._updateStyles,this))}return Object($.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._editor.removeContentWidget(this)}},{key:"getId",value:function(){return"__renameInputWidget"}},{key:"getDomNode",value:function(){var e=this;if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",Object(Z.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);var t=function(){var t,n,r=Object(ke.a)(e._acceptKeybindings,2),i=r[0],o=r[1];e._keybindingService.lookupKeybinding(i),e._label.innerText=Object(Z.a)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(t=e._keybindingService.lookupKeybinding(i))||void 0===t?void 0:t.getLabel(),null===(n=e._keybindingService.lookupKeybinding(o))||void 0===n?void 0:n.getLabel())};t(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}},{key:"_updateStyles",value:function(e){var t,n,r,i;if(this._input&&this._domNode){var o=e.getColor(Le.uc);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(Le.U))&&void 0!==t?t:""),this._domNode.style.boxShadow=o?" 0 2px 8px ".concat(o):"",this._domNode.style.color=String(null!==(n=e.getColor(Le.hb))&&void 0!==n?n:""),this._input.style.backgroundColor=String(null!==(r=e.getColor(Le.fb))&&void 0!==r?r:"");var a=e.getColor(Le.gb);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=null!==(i=null===a||void 0===a?void 0:a.toString())&&void 0!==i?i:"none"}}},{key:"_updateFont",value:function(){if(this._input&&this._label){var e=this._editor.getOption(36);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize="".concat(e.fontSize,"px"),this._label.style.fontSize="".concat(.8*e.fontSize,"px")}}},{key:"getPosition",value:function(){return this._visible?{position:this._position,preference:[2,1]}:null}},{key:"acceptInput",value:function(e){this._currentAcceptInput&&this._currentAcceptInput(e)}},{key:"cancelInput",value:function(e){this._currentCancelInput&&this._currentCancelInput(e)}},{key:"getInput",value:function(e,t,n,r,i,o){var a=this;this._domNode.classList.toggle("preview",i),this._position=new Oe.a(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var s=new we.b;return new Promise((function(e){a._currentCancelInput=function(t){return a._currentAcceptInput=void 0,a._currentCancelInput=void 0,e(t),!0},a._currentAcceptInput=function(n){0!==a._input.value.trim().length&&a._input.value!==t?(a._currentAcceptInput=void 0,a._currentCancelInput=void 0,e({newName:a._input.value,wantsPreview:i&&n})):a.cancelInput(!0)},o.onCancellationRequested((function(){return a.cancelInput(!0)})),s.add(a._editor.onDidBlurEditorWidget((function(){return a.cancelInput(!1)}))),a._show()})).finally((function(){s.dispose(),a._hide()}))}},{key:"_show",value:function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((function(){e._input.focus(),e._input.setSelectionRange(parseInt(e._input.getAttribute("selectionStart")),parseInt(e._input.getAttribute("selectionEnd")))}),100)}},{key:"_hide",value:function(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}}]),e}();_f=gf([mf(2,Ae.c),mf(3,Gt.a),mf(4,te.b)],_f);var bf=n(106),yf=n(65),Sf=n(140),Cf=n(174),kf=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ef=function(e,t){return function(n,r){t(n,r,e)}},wf=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Of=function(){function e(t,n){Object(Y.a)(this,e),this.model=t,this.position=n,this._providerRenameIdx=0,this._providers=vt.w.ordered(t)}return Object($.a)(e,[{key:"hasProvider",value:function(){return this._providers.length>0}},{key:"resolveRenameLocation",value:function(e){return wf(this,void 0,void 0,G.a.mark((function t(){var n,r,i,o;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this._providerRenameIdx=0;case 2:if(!(this._providerRenameIdx0?n.join("\n"):void 0});case 21:return t.abrupt("return",{range:new Te.a(this.position.lineNumber,o.startColumn,this.position.lineNumber,o.endColumn),text:o.word,rejectReason:n.length>0?n.join("\n"):void 0});case 22:case"end":return t.stop()}}),t,this)})))}},{key:"provideRenameEdits",value:function(e,t){return wf(this,void 0,void 0,G.a.mark((function n(){return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._provideRenameEdits(e,this._providerRenameIdx,[],t));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_provideRenameEdits",value:function(e,t,n,r){return wf(this,void 0,void 0,G.a.mark((function i(){var o,a;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(o=this._providers[t]){i.next=3;break}return i.abrupt("return",{edits:[],rejectReason:n.join("\n")});case 3:return i.next=5,o.provideRenameEdits(this.model,this.position,e,r);case 5:if(a=i.sent){i.next=10;break}return i.abrupt("return",this._provideRenameEdits(e,t+1,n.concat(Z.a("no result","No result.")),r));case 10:if(!a.rejectReason){i.next=12;break}return i.abrupt("return",this._provideRenameEdits(e,t+1,n.concat(a.rejectReason),r));case 12:return i.abrupt("return",a);case 13:case"end":return i.stop()}}),i,this)})))}}]),e}();function Tf(e,t,n){return wf(this,void 0,void 0,G.a.mark((function r(){var i,o;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new Of(e,t),r.next=3,i.resolveRenameLocation(pt.a.None);case 3:if(!(null===(o=r.sent)||void 0===o?void 0:o.rejectReason)){r.next=6;break}return r.abrupt("return",{edits:[],rejectReason:o.rejectReason});case 6:return r.abrupt("return",i.provideRenameEdits(n,pt.a.None));case 7:case"end":return r.stop()}}),r)})))}var xf=function(){function e(t,n,r,i,o,a,s){var l=this;Object(Y.a)(this,e),this.editor=t,this._instaService=n,this._notificationService=r,this._bulkEditService=i,this._progressService=o,this._logService=a,this._configService=s,this._dispoableStore=new we.b,this._cts=new pt.b,this._renameInputField=this._dispoableStore.add(new Ee.b((function(){return l._dispoableStore.add(l._instaService.createInstance(_f,l.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))})))}return Object($.a)(e,[{key:"dispose",value:function(){this._dispoableStore.dispose(),this._cts.dispose(!0)}},{key:"run",value:function(){return wf(this,void 0,void 0,G.a.mark((function e(){var t,n,r,i,o,a,s,l,c,u,d=this;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cts.dispose(!0),this.editor.hasModel()){e.next=3;break}return e.abrupt("return",void 0);case 3:if(t=this.editor.getPosition(),(n=new Of(this.editor.getModel(),t)).hasProvider()){e.next=7;break}return e.abrupt("return",void 0);case 7:return this._cts=new mt.b(this.editor,5),e.prev=8,i=n.resolveRenameLocation(this._cts.token),this._progressService.showWhile(i,250),e.next=13,i;case 13:r=e.sent,e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(8),Ft.get(this.editor).showMessage(e.t0||Z.a("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t),e.abrupt("return",void 0);case 20:if(r){e.next=22;break}return e.abrupt("return",void 0);case 22:if(!r.rejectReason){e.next=25;break}return Ft.get(this.editor).showMessage(r.rejectReason,t),e.abrupt("return",void 0);case 25:if(!this._cts.token.isCancellationRequested){e.next=27;break}return e.abrupt("return",void 0);case 27:return this._cts.dispose(),this._cts=new mt.b(this.editor,5,r.range),o=this.editor.getSelection(),a=0,s=r.text.length,Te.a.isEmpty(o)||Te.a.spansMultipleLines(o)||!Te.a.containsRange(r.range,o)||(a=Math.max(0,o.startColumn-r.range.startColumn),s=Math.min(r.range.endColumn,o.endColumn)-r.range.startColumn),l=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),e.next=36,this._renameInputField.value.getInput(r.range,r.text,a,s,l,this._cts.token);case 36:if("boolean"!==typeof(c=e.sent)){e.next=40;break}return c&&this.editor.focus(),e.abrupt("return",void 0);case 40:return this.editor.focus(),u=Object(Ee.j)(n.provideRenameEdits(c.newName,this._cts.token),this._cts.token).then((function(e){return wf(d,void 0,void 0,G.a.mark((function t(){var n=this;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&this.editor.hasModel()){t.next=2;break}return t.abrupt("return");case 2:if(!e.rejectReason){t.next=5;break}return this._notificationService.info(e.rejectReason),t.abrupt("return");case 5:this._bulkEditService.apply(ft.b.convert(e),{editor:this.editor,showPreview:c.wantsPreview,label:Z.a("label","Renaming '{0}'",null===r||void 0===r?void 0:r.text),quotableLabel:Z.a("quotableLabel","Renaming {0}",null===r||void 0===r?void 0:r.text)}).then((function(e){e.ariaSummary&&Object(he.a)(Z.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,c.newName,e.ariaSummary))})).catch((function(e){n._notificationService.error(Z.a("rename.failedApply","Rename failed to apply edits")),n._logService.error(e)}));case 6:case"end":return t.stop()}}),t,this)})))}),(function(e){d._notificationService.error(Z.a("rename.failed","Rename failed to compute edits")),d._logService.error(e)})),this._progressService.showWhile(u,250),e.abrupt("return",u);case 44:case"end":return e.stop()}}),e,this,[[8,16]])})))}},{key:"acceptRenameInput",value:function(e){this._renameInputField.value.acceptInput(e)}},{key:"cancelRenameInput",value:function(){this._renameInputField.value.cancelInput(!0)}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();xf.ID="editor.contrib.renameController",xf=kf([Ef(1,Ht.a),Ef(2,fn.a),Ef(3,ft.a),Ef(4,kt.a),Ef(5,bf.b),Ef(6,Cf.a)],xf);var Nf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.rename",label:Z.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:te.a.and(X.a.writable,X.a.hasRenameProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}return Object($.a)(n,[{key:"runCommand",value:function(e,t){var r=this,i=e.get($e.a),o=Array.isArray(t)&&t||[void 0,void 0],a=Object(ke.a)(o,2),s=a[0],l=a[1];return gt.a.isUri(s)&&Oe.a.isIPosition(l)?i.openCodeEditor({resource:s},i.getActiveCodeEditor()).then((function(e){e&&(e.setPosition(l),e.invokeWithinContext((function(t){return r.reportTelemetry(t,e),r.run(t,e)})))}),ie.e):Object(Rt.a)(Object(Mt.a)(n.prototype),"runCommand",this).call(this,e,t)}},{key:"run",value:function(e,t){var n=xf.get(t);return n?n.run():Promise.resolve()}}]),n}(Q.b);Object(Q.m)(xf.ID,xf),Object(Q.k)(Nf);var Df=Q.c.bindToContribution(xf.get);Object(Q.l)(new Df({id:"acceptRenameInput",precondition:vf,handler:function(e){return e.acceptRenameInput(!1)},kbOpts:{weight:199,kbExpr:X.a.focus,primary:3}})),Object(Q.l)(new Df({id:"acceptRenameInputWithPreview",precondition:te.a.and(vf,te.a.has("config.editor.rename.enablePreview")),handler:function(e){return e.acceptRenameInput(!0)},kbOpts:{weight:199,kbExpr:X.a.focus,primary:1027}})),Object(Q.l)(new Df({id:"cancelRenameInput",precondition:vf,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object(Q.p)("_executeDocumentRenameProvider",(function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=0;s--){var u=i.charCodeAt(s);if(s!==a&&(95===u||45===u))break;if(Object(ht.H)(u)&&Object(ht.I)(c))break;c=u}for(s+=1;l0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new Te.a(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}]),e}(),Af=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},If=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,[{key:"provideSelectionRanges",value:function(t,n){return Af(this,void 0,void 0,G.a.mark((function r(){var i,o,a,s;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=[],o=Object(Ce.a)(n),r.prev=2,s=G.a.mark((function n(){var r,o,s;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=a.value,o=[],i.push(o),s=new Map,n.next=6,new Promise((function(n){return e._bracketsRightYield(n,0,t,r,s)}));case 6:return n.next=8,new Promise((function(n){return e._bracketsLeftYield(n,0,t,r,s,o)}));case 8:case"end":return n.stop()}}),n)})),o.s();case 5:if((a=o.n()).done){r.next=9;break}return r.delegateYield(s(),"t0",7);case 7:r.next=5;break;case 9:r.next=14;break;case 11:r.prev=11,r.t1=r.catch(2),o.e(r.t1);case 14:return r.prev=14,o.f(),r.finish(14);case 17:return r.abrupt("return",i);case 18:case"end":return r.stop()}}),r,null,[[2,11,14,17]])})))}}],[{key:"_bracketsRightYield",value:function(t,n,r,i,o){for(var a=new Map,s=Date.now();;){if(n>=e._maxRounds){t();break}if(!i){t();break}var l=r.findNextBracket(i);if(!l){t();break}if(Date.now()-s>e._maxDuration){setTimeout((function(){return e._bracketsRightYield(t,n+1,r,i,o)}));break}var c=l.close[0];if(l.isOpen){var u=a.has(c)?a.get(c):0;a.set(c,u+1)}else{var d=a.has(c)?a.get(c):0;if(d-=1,a.set(c,Math.max(0,d)),d<0){var h=o.get(c);h||(h=new Ua.a,o.set(c,h)),h.push(l.range)}}i=l.range.getEndPosition()}}},{key:"_bracketsLeftYield",value:function(t,n,r,i,o,a){for(var s=new Map,l=Date.now();;){if(n>=e._maxRounds&&0===o.size){t();break}if(!i){t();break}var c=r.findPrevBracket(i);if(!c){t();break}if(Date.now()-l>e._maxDuration){setTimeout((function(){return e._bracketsLeftYield(t,n+1,r,i,o,a)}));break}var u=c.close[0];if(c.isOpen){var d=s.has(u)?s.get(u):0;if(d-=1,s.set(u,Math.max(0,d)),d<0){var h=o.get(u);if(h){var f=h.shift();0===h.size&&o.delete(u);var p=Te.a.fromPositions(c.range.getEndPosition(),f.getStartPosition()),g=Te.a.fromPositions(c.range.getStartPosition(),f.getEndPosition());a.push({range:p}),a.push({range:g}),e._addBracketLeading(r,g,a)}}}else{var m=s.has(u)?s.get(u):0;s.set(u,m+1)}i=c.range.getStartPosition()}}},{key:"_addBracketLeading",value:function(e,t,n){if(t.startLineNumber!==t.endLineNumber){var r=t.startLineNumber,i=e.getLineFirstNonWhitespaceColumn(r);0!==i&&i!==t.startColumn&&(n.push({range:Te.a.fromPositions(new Oe.a(r,i),t.getEndPosition())}),n.push({range:Te.a.fromPositions(new Oe.a(r,1),t.getEndPosition())}));var o=r-1;if(o>0){var a=e.getLineFirstNonWhitespaceColumn(o);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(o)&&(n.push({range:Te.a.fromPositions(new Oe.a(o,a),t.getEndPosition())}),n.push({range:Te.a.fromPositions(new Oe.a(o,1),t.getEndPosition())}))}}}}]),e}();If._maxDuration=30,If._maxRounds=2;var Rf=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Mf=function(){function e(t,n){Object(Y.a)(this,e),this.index=t,this.ranges=n}return Object($.a)(e,[{key:"mov",value:function(t){var n=this.index+(t?1:-1);if(n<0||n>=this.ranges.length)return this;var r=new e(n,this.ranges);return r.ranges[n].equalsRange(this.ranges[this.index])?r.mov(t):r}}]),e}(),Pf=function(){function e(t){Object(Y.a)(this,e),this._ignoreSelection=!1,this._editor=t}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this._selectionListener)}},{key:"run",value:function(e){var t=this;if(this._editor.hasModel()){var n=this._editor.getSelections(),r=this._editor.getModel();if(vt.x.has(r)){var i=Promise.resolve(void 0);return this._state||(i=Uf(r,n.map((function(e){return e.getPosition()})),pt.a.None).then((function(e){if(ne.o(e)&&e.length===n.length&&t._editor.hasModel()&&ne.g(t._editor.getSelections(),n,(function(e,t){return e.equalsSelection(t)}))){for(var r=function(t){e[t]=e[t].filter((function(e){return e.containsPosition(n[t].getStartPosition())&&e.containsPosition(n[t].getEndPosition())})),e[t].unshift(n[t])},i=0;i1?t-1:0),r=1;r=this.value.length)return{type:14,pos:this.pos,len:0};var t,n=this.pos,r=0,i=this.value.charCodeAt(n);if("number"===typeof(t=e._table[i]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(i)){t=8;do{r+=1,i=this.value.charCodeAt(n+r)}while(e.isDigitCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}if(e.isVariableCharacter(i)){t=9;do{i=this.value.charCodeAt(n+ ++r)}while(e.isVariableCharacter(i)||e.isDigitCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}t=10;do{r+=1,i=this.value.charCodeAt(n+r)}while(!isNaN(i)&&"undefined"===typeof e._table[i]&&!e.isDigitCharacter(i)&&!e.isVariableCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}}],[{key:"isDigitCharacter",value:function(e){return e>=48&&e<=57}},{key:"isVariableCharacter",value:function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}}]),e}();Vf._table=(Hf={},Object(zf.a)(Hf,36,0),Object(zf.a)(Hf,58,1),Object(zf.a)(Hf,44,2),Object(zf.a)(Hf,123,3),Object(zf.a)(Hf,125,4),Object(zf.a)(Hf,92,5),Object(zf.a)(Hf,47,6),Object(zf.a)(Hf,124,7),Object(zf.a)(Hf,43,11),Object(zf.a)(Hf,45,12),Object(zf.a)(Hf,63,13),Hf);var Wf=function(){function e(){Object(Y.a)(this,e),this._children=[]}return Object($.a)(e,[{key:"appendChild",value:function(e){return e instanceof Gf&&this._children[this._children.length-1]instanceof Gf?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}},{key:"replace",value:function(e,t){var n=e.parent,r=n.children.indexOf(e),i=n.children.slice(0);i.splice.apply(i,[r,1].concat(Object(ct.a)(t))),n._children=i,function e(t,n){var r,i=Object(Ce.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent=n,e(o.children,o)}}catch(a){i.e(a)}finally{i.f()}}(t,n)}},{key:"toString",value:function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")}},{key:"len",value:function(){return 0}},{key:"children",get:function(){return this._children}},{key:"snippet",get:function(){for(var e=this;;){if(!e)return;if(e instanceof ep)return e;e=e.parent}}}]),e}(),Gf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).value=e,r}return Object($.a)(n,[{key:"toString",value:function(){return this.value}},{key:"len",value:function(){return this.value.length}},{key:"clone",value:function(){return new n(this.value)}}]),n}(Wf),qf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return n}(Wf),Kf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).index=e,r}return Object($.a)(n,[{key:"clone",value:function(){var e=new n(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e}},{key:"isFinalTabstop",get:function(){return 0===this.index}},{key:"choice",get:function(){return 1===this._children.length&&this._children[0]instanceof Yf?this._children[0]:void 0}}],[{key:"compareByIndex",value:function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}}]),n}(qf),Yf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.apply(this,arguments)).options=[],e}return Object($.a)(n,[{key:"appendChild",value:function(e){return e instanceof Gf&&(e.parent=this,this.options.push(e)),this}},{key:"toString",value:function(){return this.options[0].value}},{key:"len",value:function(){return this.options[0].len()}},{key:"clone",value:function(){var e=new n;return this.options.forEach(e.appendChild,e),e}}]),n}(Wf),$f=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.apply(this,arguments)).regexp=new RegExp(""),e}return Object($.a)(n,[{key:"resolve",value:function(e){var t=this,n=!1,r=e.replace(this.regexp,(function(){return n=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!n&&this._children.some((function(e){return e instanceof Qf&&Boolean(e.elseValue)}))&&(r=this._replace([])),r}},{key:"_replace",value:function(e){var t,n="",r=Object(Ce.a)(this._children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i instanceof Qf){var o=e[i.index]||"";n+=o=i.resolve(o)}else n+=i.toString()}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"toString",value:function(){return""}},{key:"clone",value:function(){var e=new n;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e}}]),n}(Wf),Qf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this)).index=e,a.shorthandName=r,a.ifValue=i,a.elseValue=o,a}return Object($.a)(n,[{key:"resolve",value:function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"===typeof this.ifValue?this.ifValue:Boolean(e)||"string"!==typeof this.elseValue?e||"":this.elseValue}},{key:"_toPascalCase",value:function(e){var t=e.match(/[a-z]+/gi);return t?t.map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(""):e}},{key:"clone",value:function(){return new n(this.index,this.shorthandName,this.ifValue,this.elseValue)}}]),n}(Wf),Zf=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).name=e,r}return Object($.a)(n,[{key:"resolve",value:function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new Gf(t)],!0)}},{key:"clone",value:function(){var e=new n(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e}}]),n}(qf);function Xf(e,t){for(var n=Object(ct.a)(e);n.length>0;){var r=n.shift();if(!t(r))break;n.unshift.apply(n,Object(ct.a)(r.children))}}var Jf,ep=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"offset",value:function(e){var t=0,n=!1;return this.walk((function(r){return r===e?(n=!0,!1):(t+=r.len(),!0)})),n?t:-1}},{key:"fullLen",value:function(e){var t=0;return Xf([e],(function(e){return t+=e.len(),!0})),t}},{key:"enclosingPlaceholders",value:function(e){for(var t=[],n=e.parent;n;)n instanceof Kf&&t.push(n),n=n.parent;return t}},{key:"resolveVariables",value:function(e){var t=this;return this.walk((function(n){return n instanceof Zf&&n.resolve(e)&&(t._placeholders=void 0),!0})),this}},{key:"appendChild",value:function(e){return this._placeholders=void 0,Object(Rt.a)(Object(Mt.a)(n.prototype),"appendChild",this).call(this,e)}},{key:"replace",value:function(e,t){return this._placeholders=void 0,Object(Rt.a)(Object(Mt.a)(n.prototype),"replace",this).call(this,e,t)}},{key:"clone",value:function(){var e=new n;return this._children=this.children.map((function(e){return e.clone()})),e}},{key:"walk",value:function(e){Xf(this.children,e)}},{key:"placeholderInfo",get:function(){if(!this._placeholders){var e,t=[];this.walk((function(n){return n instanceof Kf&&(t.push(n),e=!e||e.index0?i.set(e.index,e.children):o.push(e)),!0}));for(var s=0,l=o;s0&&t),!i.has(0)&&n&&r.appendChild(new Kf(0)),r}},{key:"_accept",value:function(e,t){if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1}},{key:"_backTo",value:function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}},{key:"_until",value:function(e){for(var t=this._token;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){var n=this._scanner.next();if(0!==n.type&&4!==n.type&&5!==n.type)return!1}this._token=this._scanner.next()}var r=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}},{key:"_parse",value:function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}},{key:"_parseEscaped",value:function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Gf(t)),!0)}},{key:"_parseTabstopOrVariableName",value:function(e){var t,n=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Kf(Number(t)):new Zf(t)),!0):this._backTo(n)}},{key:"_parseComplexPlaceholder",value:function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var r=new Kf(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new Gf("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else{if(!(r.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n);for(var i=new Yf;;){if(this._parseChoiceElement(i)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(i),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}}},{key:"_parseChoiceElement",value:function(e){for(var t=this._token,n=[];2!==this._token.type&&7!==this._token.type;){var r=void 0;if(!(r=(r=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(r)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new Gf(n.join(""))),!0)}},{key:"_parseComplexVariable",value:function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var r=new Zf(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new Gf("${"+t+":")),r.children.forEach(e.appendChild,e),!0}}},{key:"_parseTransform",value:function(e){for(var t=new $f,n="",r="";!this._accept(6);){var i=void 0;if(i=this._accept(5,!0))n+=i=this._accept(6,!0)||i;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);){var o=void 0;if(o=this._accept(5,!0))o=this._accept(5,!0)||this._accept(6,!0)||o,t.appendChild(new Gf(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;r+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,r)}catch(a){return!1}return e.transform=t,!0}},{key:"_parseFormatString",value:function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var r=this._accept(8,!0);if(!r)return this._backTo(t),!1;if(!n)return e.appendChild(new Qf(Number(r))),!0;if(this._accept(4))return e.appendChild(new Qf(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new Qf(Number(r),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){var o=this._until(4);if(o)return e.appendChild(new Qf(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){var a=this._until(4);if(a)return e.appendChild(new Qf(Number(r),void 0,void 0,a)),!0}else if(this._accept(13)){var s=this._until(1);if(s){var l=this._until(4);if(l)return e.appendChild(new Qf(Number(r),void 0,s,l)),!0}}else{var c=this._until(4);if(c)return e.appendChild(new Qf(Number(r),void 0,void 0,c)),!0}return this._backTo(t),!1}},{key:"_parseAnything",value:function(e){return 14!==this._token.type&&(e.appendChild(new Gf(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}],[{key:"escape",value:function(e){return e.replace(/\$|}|\\/g,"\\$&")}},{key:"guessNeedsClipboard",value:function(e){return/\${?CLIPBOARD/.test(e)}}]),e}(),np=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},rp={Visible:new te.c("suggestWidgetVisible",!1),DetailsVisible:new te.c("suggestWidgetDetailsVisible",!1),MultipleSuggestions:new te.c("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new te.c("suggestionMakesTextEdit",!0),AcceptSuggestionsOnEnter:new te.c("acceptSuggestionOnEnter",!0),HasInsertAndReplaceRange:new te.c("suggestionHasInsertAndReplaceRange",!1),CanResolve:new te.c("suggestionCanResolve",!1)},ip=new Ie.b("suggestWidgetStatusBar"),op=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.position=t,this.completion=n,this.container=r,this.provider=i,this.isInvalid=!1,this.score=wl.a.Default,this.distance=0,this.textLabel="string"===typeof n.label?n.label:n.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=n.sortText&&n.sortText.toLowerCase(),this.filterTextLow=n.filterText&&n.filterText.toLowerCase(),Te.a.isIRange(n.range)?(this.editStart=new Oe.a(n.range.startLineNumber,n.range.startColumn),this.editInsertEnd=new Oe.a(n.range.endLineNumber,n.range.endColumn),this.editReplaceEnd=new Oe.a(n.range.endLineNumber,n.range.endColumn),this.isInvalid=this.isInvalid||Te.a.spansMultipleLines(n.range)||n.range.startLineNumber!==t.lineNumber):(this.editStart=new Oe.a(n.range.insert.startLineNumber,n.range.insert.startColumn),this.editInsertEnd=new Oe.a(n.range.insert.endLineNumber,n.range.insert.endColumn),this.editReplaceEnd=new Oe.a(n.range.replace.endLineNumber,n.range.replace.endColumn),this.isInvalid=this.isInvalid||Te.a.spansMultipleLines(n.range.insert)||Te.a.spansMultipleLines(n.range.replace)||n.range.insert.startLineNumber!==t.lineNumber||n.range.replace.startLineNumber!==t.lineNumber||n.range.insert.startColumn!==n.range.replace.startColumn),"function"!==typeof i.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}return Object($.a)(e,[{key:"resolve",value:function(e){return np(this,void 0,void 0,G.a.mark((function t(){var n,r=this;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._resolveCache||(n=e.onCancellationRequested((function(){r._resolveCache=void 0,r._isResolved=!1})),this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((function(e){Object.assign(r.completion,e),r._isResolved=!0,n.dispose()}),(function(e){Object(ie.d)(e)&&(r._resolveCache=void 0,r._isResolved=!1)}))),t.abrupt("return",this._resolveCache);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"isResolved",get:function(){return!!this._isResolved}}]),e}(),ap=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;Object(Y.a)(this,e),this.snippetSortOrder=t,this.kindFilter=n,this.providerFilter=r};ap.default=new ap;var sp=function e(t,n,r){Object(Y.a)(this,e),this.items=t,this.needsClipboard=n,this.dispoables=r};function lp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ap.default,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{triggerKind:0},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:pt.a.None;return np(this,void 0,void 0,G.a.mark((function o(){var a,s,l,c,u,d,h,f,p,g,m,v,_=this;return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=t.clone(),a=e.getWordAtPosition(t),s=a?new Te.a(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):Te.a.fromPositions(t),l={replace:s,insert:s.setEndPosition(t.lineNumber,t.column)},c=[],u=new we.b,d=!1,h=function(e,r){if(r){var i,o=Object(Ce.a)(r.suggestions);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.kindFilter.has(a.kind)||(a.range||(a.range=l),a.sortText||(a.sortText="string"===typeof a.label?a.label:a.label.name),!d&&a.insertTextRules&&4&a.insertTextRules&&(d=tp.guessNeedsClipboard(a.insertText)),c.push(new op(t,a,r,e)))}}catch(s){o.e(s)}finally{o.f()}Object(we.g)(r)&&u.add(r)}},f=np(_,void 0,void 0,G.a.mark((function o(){var a;return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return");case 2:if(!(n.providerFilter.size>0)||n.providerFilter.has(Jf)){o.next=4;break}return o.abrupt("return");case 4:return o.next=6,Jf.provideCompletionItems(e,t,r,i);case 6:a=o.sent,h(Jf,a);case 8:case"end":return o.stop()}}),o)}))),p=Object(Ce.a)(vt.d.orderedGroups(e)),o.prev=10,p.s();case 12:if((g=p.n()).done){o.next=21;break}return m=g.value,v=c.length,o.next=17,Promise.all(m.map((function(o){return np(_,void 0,void 0,G.a.mark((function a(){var s;return G.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(n.providerFilter.size>0)||n.providerFilter.has(o)){a.next=2;break}return a.abrupt("return");case 2:return a.prev=2,a.next=5,o.provideCompletionItems(e,t,r,i);case 5:s=a.sent,h(o,s),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(2),Object(ie.f)(a.t0);case 12:case"end":return a.stop()}}),a,null,[[2,9]])})))})));case 17:if(v===c.length&&!i.isCancellationRequested){o.next=19;break}return o.abrupt("break",21);case 19:o.next=12;break;case 21:o.next=26;break;case 23:o.prev=23,o.t0=o.catch(10),p.e(o.t0);case 26:return o.prev=26,p.f(),o.finish(26);case 29:return o.next=31,f;case 31:if(!i.isCancellationRequested){o.next=34;break}return u.dispose(),o.abrupt("return",Promise.reject(Object(ie.a)()));case 34:return o.abrupt("return",new sp(c.sort(dp(n.snippetSortOrder)),d,u));case 35:case"end":return o.stop()}}),o,null,[[10,23,26,29]])})))}function cp(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}var up=new Map;function dp(e){return up.get(e)}up.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return cp(e,t)})),up.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return cp(e,t)})),up.set(1,cp),Object(Q.j)("_executeCompletionItemProvider",(function(e,t,n){return np(void 0,void 0,void 0,G.a.mark((function r(){var i,o,a,s,l,c,u;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i={incomplete:!1,suggestions:[]},o=[],a=n.maxItemsToResolve||0,r.next=5,lp(e,t);case 5:s=r.sent,l=Object(Ce.a)(s.items);try{for(l.s();!(c=l.n()).done;)u=c.value,o.length=0){var r,i=[],o=Object(Ce.a)(this._placeholderGroups[this._placeholderGroupsIdx]);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.transform){var s=this._placeholderDecorations.get(a),l=this._editor.getModel().getDecorationRange(s),c=this._editor.getModel().getValueInRange(l);i.push(lr.a.replaceMove(l,a.transform.resolve(c)))}}}catch(h){o.e(h)}finally{o.f()}i.length>0&&this._editor.executeEdits("snippet.placeholderTransform",i)}var u=!1;!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,u=!0);var d=this._editor.getModel().changeDecorations((function(t){var r,i=new Set,o=[],a=Object(Ce.a)(n._placeholderGroups[n._placeholderGroupsIdx]);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=n._placeholderDecorations.get(s),c=n._editor.getModel().getDecorationRange(l);o.push(new J.a(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),u=u&&n._hasPlaceholderBeenCollapsed(s),t.changeDecorationOptions(l,s.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(s);var d,f=Object(Ce.a)(n._snippet.enclosingPlaceholders(s));try{for(f.s();!(d=f.n()).done;){var p=d.value,g=n._placeholderDecorations.get(p);t.changeDecorationOptions(g,p.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(p)}}catch(h){f.e(h)}finally{f.f()}}}catch(h){a.e(h)}finally{a.f()}var m,v=Object(Ce.a)(n._placeholderDecorations);try{for(v.s();!(m=v.n()).done;){var _=Object(ke.a)(m.value,2),b=_[0],y=_[1];i.has(b)||t.changeDecorationOptions(y,b.isFinalTabstop?e._decor.inactiveFinal:e._decor.inactive)}}catch(h){v.e(h)}finally{v.f()}return o}));return u?this.move(t):null!==d&&void 0!==d?d:[]}},{key:"_hasPlaceholderBeenCollapsed",value:function(e){for(var t=e;t;){if(t instanceof Kf){var n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}},{key:"computePossibleSelections",value:function(){var e,t=new Map,n=Object(Ce.a)(this._placeholderGroups);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=void 0,a=Object(Ce.a)(i);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.isFinalTabstop)break;o||(o=[],t.set(s.index,o));var l=this._placeholderDecorations.get(s),c=this._editor.getModel().getDecorationRange(l);if(!c){t.delete(s.index);break}o.push(c)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){n.e(u)}finally{n.f()}return t}},{key:"merge",value:function(t){var n=this,r=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((function(i){var o,a=Object(Ce.a)(n._placeholderGroups[n._placeholderGroupsIdx]);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=t.shift();console.assert(!l._placeholderDecorations);var c,u=l._snippet.placeholderInfo.last.index,d=Object(Ce.a)(l._snippet.placeholderInfo.all);try{for(d.s();!(c=d.n()).done;){var h=c.value;h.isFinalTabstop?h.index=s.index+(u+1)/n._nestingLevel:h.index=s.index+h.index/n._nestingLevel}}catch(S){d.e(S)}finally{d.f()}n._snippet.replace(s,l._snippet.children);var f=n._placeholderDecorations.get(s);i.removeDecoration(f),n._placeholderDecorations.delete(s);var p,g=Object(Ce.a)(l._snippet.placeholders);try{for(g.s();!(p=g.n()).done;){var m=p.value,v=l._snippet.offset(m),_=l._snippet.fullLen(m),b=Te.a.fromPositions(r.getPositionAt(l._offset+v),r.getPositionAt(l._offset+v+_)),y=i.addDecoration(b,e._decor.inactive);n._placeholderDecorations.set(m,y)}}catch(S){g.e(S)}finally{g.f()}}}catch(S){a.e(S)}finally{a.f()}n._placeholderGroups=Object(ne.m)(n._snippet.placeholders,Kf.compareByIndex)}))}},{key:"isAtFirstPlaceholder",get:function(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}},{key:"isAtLastPlaceholder",get:function(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}},{key:"hasPlaceholder",get:function(){return this._snippet.placeholders.length>0}},{key:"choice",get:function(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}}]),e}();Ep._decor={active:Ne.a.register({stickiness:0,className:"snippet-placeholder"}),inactive:Ne.a.register({stickiness:1,className:"snippet-placeholder"}),activeFinal:Ne.a.register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ne.a.register({stickiness:1,className:"finish-snippet-placeholder"})};var wp={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Op=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp;Object(Y.a)(this,e),this._templateMerges=[],this._snippets=[],this._editor=t,this._template=n,this._options=r}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this._snippets)}},{key:"_logInfo",value:function(){return'template="'.concat(this._template,'", merged_templates="').concat(this._templateMerges.join(" -> "),'"')}},{key:"insert",value:function(){var t=this;if(this._editor.hasModel()){var n=e.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer),r=n.edits,i=n.snippets;this._snippets=i,this._editor.executeEdits("snippet",r,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.filter((function(e){return!!e.identifier})).map((function(e){return J.a.fromPositions(e.range.getEndPosition())}))})),this._editor.revealRange(this._editor.getSelections()[0])}}},{key:"merge",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wp;if(this._editor.hasModel()){this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var i=e.createEditsAndSnippets(this._editor,t,r.overwriteBefore,r.overwriteAfter,!0,r.adjustWhitespace,r.clipboardText,r.overtypingCapturer),o=i.edits,a=i.snippets;this._editor.executeEdits("snippet",o,(function(e){var t,r=Object(Ce.a)(n._snippets);try{for(r.s();!(t=r.n()).done;){t.value.merge(a)}}catch(i){r.e(i)}finally{r.f()}return console.assert(0===a.length),n._snippets[0].hasPlaceholder?n._move(void 0):e.filter((function(e){return!!e.identifier})).map((function(e){return J.a.fromPositions(e.range.getEndPosition())}))}))}}},{key:"next",value:function(){var e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}},{key:"prev",value:function(){var e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}},{key:"_move",value:function(e){var t,n=[],r=Object(Ce.a)(this._snippets);try{for(r.s();!(t=r.n()).done;){var i=t.value.move(e);n.push.apply(n,Object(ct.a)(i))}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"isSelectionWithinPlaceholders",value:function(){if(!this.hasPlaceholder)return!1;var e=this._editor.getSelections();if(e.length0}},{key:"isAtFirstPlaceholder",get:function(){return this._snippets[0].isAtFirstPlaceholder}},{key:"isAtLastPlaceholder",get:function(){return this._snippets[0].isAtLastPlaceholder}},{key:"hasPlaceholder",get:function(){return this._snippets[0].hasPlaceholder}},{key:"choice",get:function(){return this._snippets[0].choice}}],[{key:"adjustWhitespace",value:function(e,t,n,r,i){var o=e.getLineContent(t.lineNumber),a=Object(ht.z)(o,0,t.column-1);n.walk((function(t){if(t instanceof Gf&&!(t.parent instanceof Yf)){var n=t.value.split(/\r\n|\r|\n/);if(r)for(var o=1;o0&&b!==h.getLineFirstNonWhitespaceColumn(k.positionLineNumber),!0),x.resolveVariables(new mp([p,new bp(g,E,y.length,"spread"===t.getOption(62)),new vp(h,k,E,l),new yp(h,k),new Sp,new Cp(f),new kp]));var D=h.getOffsetAt(N)+m;m+=x.toString().length-h.getValueLengthInRange(T),c[E]=lr.a.replace(T,x.toString()),c[E].identifier={major:E,minor:0},u[E]=new Ep(t,x,D)}}catch(L){S.e(L)}finally{S.f()}return{edits:c,snippets:u}}}]),e}(),Tp=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},xp=function(e,t){return function(n,r){t(n,r,e)}},Np={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},Dp=function(){function e(t,n,r){Object(Y.a)(this,e),this._editor=t,this._logService=n,this._snippetListener=new we.b,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(r),this._hasNextTabstop=e.HasNextTabstop.bindTo(r),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(r)}return Object($.a)(e,[{key:"dispose",value:function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(we.f)(this._session),this._snippetListener.dispose()}},{key:"insert",value:function(e,t){try{this._doInsert(e,"undefined"===typeof t?Np:Object.assign(Object.assign({},Np),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}},{key:"_doInsert",value:function(e,t){var n=this;this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Op(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((function(e){return e.isFlush&&n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeModel((function(){return n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((function(){return n._updateState()}))))}},{key:"_updateState",value:function(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}},{key:"_handleChoice",value:function(){var e=this;if(this._session&&this._editor.hasModel()){var t,n,r=this._session.choice;if(r){if(this._currentChoice!==r){this._currentChoice=r,this._editor.setSelections(this._editor.getSelections().map((function(e){return J.a.fromPositions(e.getStartPosition())})));var i=Object(ke.a)(r.options,1)[0];t=this._editor,n=r.options.map((function(t,n){return{kind:13,label:t.value,insertText:t.value,sortText:"a".repeat(n+1),range:Te.a.fromPositions(e._editor.getPosition(),e._editor.getPosition().delta(0,i.value.length))}})),setTimeout((function(){var e;(e=hp.onlyOnceSuggestions).push.apply(e,Object(ct.a)(n)),t.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(hp))}),0)}}else this._currentChoice=void 0}else this._currentChoice=void 0}},{key:"finish",value:function(){for(;this._inSnippet.get();)this.next()}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),Object(we.f)(this._session),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}},{key:"prev",value:function(){this._session&&this._session.prev(),this._updateState()}},{key:"next",value:function(){this._session&&this._session.next(),this._updateState()}},{key:"isInSnippet",value:function(){return Boolean(this._inSnippet.get())}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Dp.ID="snippetController2",Dp.InSnippetMode=new te.c("inSnippetMode",!1),Dp.HasNextTabstop=new te.c("hasNextTabstop",!1),Dp.HasPrevTabstop=new te.c("hasPrevTabstop",!1),Dp=Tp([xp(1,bf.b),xp(2,te.b)],Dp),Object(Q.m)(Dp.ID,Dp);var Lp=Q.c.bindToContribution(Dp.get);Object(Q.l)(new Lp({id:"jumpToNextSnippetPlaceholder",precondition:te.a.and(Dp.InSnippetMode,Dp.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:2}})),Object(Q.l)(new Lp({id:"jumpToPrevSnippetPlaceholder",precondition:te.a.and(Dp.InSnippetMode,Dp.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:1026}})),Object(Q.l)(new Lp({id:"leaveSnippet",precondition:Dp.InSnippetMode,handler:function(e){return e.cancel(!0)},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(Q.l)(new Lp({id:"acceptSnippet",precondition:Dp.InSnippetMode,handler:function(e){return e.finish()}}));var Ap=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Ip=function(e,t){return function(n,r){t(n,r,e)}},Rp=function(){function e(t){Object(Y.a)(this,e),this.name=t}return Object($.a)(e,[{key:"select",value:function(e,t,n){if(0===n.length)return 0;for(var r=n[0].score[0],i=0;il&&d.type===r[c].completion.kind&&d.insertText===r[c].completion.insertText&&(l=d.touch,s=c),r[c].completion.preselect&&-1===a)return c}return-1!==s?s:-1!==a?a:0}},{key:"toJSON",value:function(){return this._cache.toJSON()}},{key:"fromJSON",value:function(e){this._cache.clear();var t,n=Object(Ce.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(ke.a)(t.value,2),i=r[0],o=r[1];o.touch=0,o.type="number"===typeof o.type?o.type:Object(vt.E)(o.type),this._cache.set(i,o)}}catch(a){n.e(a)}finally{n.f()}this._seq=this._cache.size}}]),n}(Rp),jp=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this,"recentlyUsedByPrefix"))._trie=zn.c.forStrings(),e._seq=0,e}return Object($.a)(n,[{key:"memorize",value:function(e,t,n){var r=e.getWordUntilPosition(t).word,i="".concat(e.getLanguageIdentifier().language,"/").concat(r);this._trie.set(i,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}},{key:"select",value:function(e,t,r){var i=e.getWordUntilPosition(t).word;if(!i)return Object(Rt.a)(Object(Mt.a)(n.prototype),"select",this).call(this,e,t,r);var o="".concat(e.getLanguageIdentifier().language,"/").concat(i),a=this._trie.get(o);if(a||(a=this._trie.findSubstr(o)),a)for(var s=0;s0){this._seq=e[0][1].touch+1;var t,n=Object(Ce.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(ke.a)(t.value,2),i=r[0],o=r[1];o.type="number"===typeof o.type?o.type:Object(vt.E)(o.type),this._trie.set(i,o)}}catch(a){n.e(a)}finally{n.f()}}}}]),n}(Rp),Fp=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._storageService=t,this._modeService=n,this._configService=r,this._disposables=new we.b,this._persistSoon=new Ee.d((function(){return i._saveState()}),500),this._disposables.add(t.onWillSaveState((function(e){e.reason===Vn.c.SHUTDOWN&&i._saveState()})))}return Object($.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._persistSoon.dispose()}},{key:"memorize",value:function(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}},{key:"select",value:function(e,t,n){return this._withStrategy(e,t).select(e,t,n)}},{key:"_withStrategy",value:function(t,n){var r,i,o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(r=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(n.lineNumber,n.column)))||void 0===r?void 0:r.language,resource:t.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==o){this._saveState();var a=e._strategyCtors.get(o)||Mp;this._strategy=new a;try{var s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,l=this._storageService.get("".concat(e._storagePrefix,"/").concat(o),s);l&&this._strategy.fromJSON(JSON.parse(l))}catch(c){}}return this._strategy}},{key:"_saveState",value:function(){if(this._strategy){var t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store("".concat(e._storagePrefix,"/").concat(this._strategy.name),n,t)}}}]),e}();Fp._strategyCtors=new Map([["recentlyUsedByPrefix",jp],["recentlyUsed",Pp],["first",Mp]]),Fp._storagePrefix="suggest/memories",Fp=Ap([Ip(0,Vn.a),Ip(1,Pc.a),Ip(2,ir.a)],Fp);var Bp=Object(Ht.c)("ISuggestMemories");Object(Hn.b)(Bp,Fp,!0);var Up=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Hp=function(e,t){return function(n,r){t(n,r,e)}},zp=function(){function e(t,n){Object(Y.a)(this,e),this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(n)}return Object($.a)(e,[{key:"dispose",value:function(){this.reset()}},{key:"reset",value:function(){this._ckOtherSuggestions.reset(),Object(we.f)(this._listener),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}},{key:"set",value:function(t,n){var r=this,i=t.model,o=t.index;0!==i.items.length?e._moveIndex(!0,i,o)!==o?(this._acceptNext=n,this._model=i,this._index=o,this._listener=this._editor.onDidChangeCursorPosition((function(){r._ignore||r.reset()})),this._ckOtherSuggestions.set(!0)):this.reset():this.reset()}},{key:"next",value:function(){this._move(!0)}},{key:"prev",value:function(){this._move(!1)}},{key:"_move",value:function(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}}],[{key:"_moveIndex",value:function(e,t,n){for(var r=n;(r=(r+t.items.length+(e?1:-1))%t.items.length)!==n&&t.items[r].completion.additionalTextEdits;);return r}}]),e}();zp.OtherSuggestions=new te.c("hasOtherSuggestions",!1),zp=Up([Hp(1,te.b)],zp);var Vp=function(){function e(t,n,r,i,o,a,s){Object(Y.a)(this,e),this.clipboardText=s,this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._wordDistance=i,this._options=o,this._refilterKind=1,this._lineContext=r,"top"===a?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===a&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return Object($.a)(e,[{key:"adopt",value:function(e){for(var t=[],n=0;n2e3?wl.d:wl.e,l=0;l=d)c.score=wl.a.Default;else if("string"===typeof c.completion.filterText){var g=s(r,i,h,c.completion.filterText,c.filterTextLow,0,!1);if(!g)continue;0===Object(ht.g)(c.completion.filterText,p)?c.score=g:(c.score=Object(wl.b)(r,i,h,p,c.labelLow,0),c.score[0]=g[0])}else{var m=s(r,i,h,p,c.labelLow,0,!1);if(!m)continue;c.score=m}}switch(c.idx=l,c.distance=this._wordDistance.distance(c.position,c.completion),a.push(c),this._stats.suggestionCount++,c.completion.kind){case 27:this._stats.snippetCount++;break;case 18:this._stats.textCount++}}}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0}},{key:"lineContext",get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDeltat.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}},{key:"_compareCompletionItemsSnippetsDown",value:function(t,n){if(t.completion.kind!==n.completion.kind){if(27===t.completion.kind)return 1;if(27===n.completion.kind)return-1}return e._compareCompletionItems(t,n)}},{key:"_compareCompletionItemsSnippetsUp",value:function(t,n){if(t.completion.kind!==n.completion.kind){if(27===t.completion.kind)return-1;if(27===n.completion.kind)return 1}return e._compareCompletionItems(t,n)}}]),e}(),Wp=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Gp=function(){function e(){Object(Y.a)(this,e)}return Object($.a)(e,null,[{key:"create",value:function(t,n){return Wp(this,void 0,void 0,G.a.mark((function r(){var i,o,a,s,l,c,u;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.getOption(96).localityBonus){r.next=2;break}return r.abrupt("return",e.None);case 2:if(n.hasModel()){r.next=4;break}return r.abrupt("return",e.None);case 4:if(i=n.getModel(),o=n.getPosition(),t.canComputeWordRanges(i.uri)){r.next=8;break}return r.abrupt("return",e.None);case 8:return r.next=10,(new If).provideSelectionRanges(i,[o]);case 10:if(a=r.sent,s=Object(ke.a)(a,1),0!==(l=s[0]).length){r.next=15;break}return r.abrupt("return",e.None);case 15:return r.next=17,t.computeWordRanges(i.uri,l[0].range);case 17:if(c=r.sent){r.next=20;break}return r.abrupt("return",e.None);case 20:return u=i.getWordUntilPosition(o),delete c[u.word],r.abrupt("return",new(function(e){Object(q.a)(r,e);var t=Object(K.a)(r);function r(){return Object(Y.a)(this,r),t.apply(this,arguments)}return Object($.a)(r,[{key:"distance",value:function(e,t){if(!o.equals(n.getPosition()))return 0;if(17===t.kind)return 2<<20;var r="string"===typeof t.label?t.label:t.label.name,i=c[r];if(Object(ne.n)(i))return 2<<20;var a,s=Object(ne.c)(i,Te.a.fromPositions(e),Te.a.compareRangesUsingStarts),u=s>=0?i[s]:i[Math.max(0,~s-1)],d=l.length,h=Object(Ce.a)(l);try{for(h.s();!(a=h.n()).done;){var f=a.value;if(!Te.a.containsRange(f.range,u))break;d-=1}}catch(p){h.e(p)}finally{h.f()}return d}}]),r}(e)));case 23:case"end":return r.stop()}}),r)})))}}]),e}();Gp.None=new(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"distance",value:function(){return 0}}]),n}(Gp));var qp=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Kp=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.leadingLineContent=t.getLineContent(n.lineNumber).substr(0,n.column-1),this.leadingWord=t.getWordUntilPosition(n),this.lineNumber=n.lineNumber,this.column=n.column,this.auto=r,this.shy=i}return Object($.a)(e,null,[{key:"shouldAutoTrigger",value:function(e){if(!e.hasModel())return!1;var t=e.getModel(),n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);var r=t.getWordAtPosition(n);return!!r&&(r.endColumn===n.column&&!!isNaN(Number(r.word)))}}]),e}(),Yp=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._editor=t,this._editorWorkerService=n,this._clipboardService=r,this._toDispose=new we.b,this._quickSuggestDelay=10,this._triggerCharacterListener=new we.b,this._triggerQuickSuggest=new Ee.e,this._state=0,this._completionDisposables=new we.b,this._onDidCancel=new en.a,this._onDidTrigger=new en.a,this._onDidSuggest=new en.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._currentSelection=this._editor.getSelection()||new J.a(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((function(){i._updateTriggerCharacters(),i.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((function(){i._updateTriggerCharacters(),i.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((function(){i._updateTriggerCharacters(),i._updateQuickSuggest()}))),this._toDispose.add(vt.d.onDidChange((function(){i._updateTriggerCharacters(),i._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((function(e){i._onCursorChange(e)})));var o=!1;this._toDispose.add(this._editor.onDidCompositionStart((function(){o=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((function(){o=!1,i._refilterCompletionItems()}))),this._toDispose.add(this._editor.onDidChangeModelContent((function(){o||i._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return Object($.a)(e,[{key:"dispose",value:function(){Object(we.f)(this._triggerCharacterListener),Object(we.f)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}},{key:"_updateQuickSuggest",value:function(){this._quickSuggestDelay=this._editor.getOption(71),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}},{key:"_updateTriggerCharacters",value:function(){var e=this;if(this._triggerCharacterListener.clear(),!this._editor.getOption(72)&&this._editor.hasModel()&&this._editor.getOption(99)){var t,n=new Map,r=Object(Ce.a)(vt.d.all(this._editor.getModel()));try{for(r.s();!(t=r.n()).done;){var i,o=t.value,a=Object(Ce.a)(o.triggerCharacters||[]);try{for(a.s();!(i=a.n()).done;){var s=i.value,l=n.get(s);l||((l=new Set).add(Jf),n.set(s,l)),l.add(o)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){r.e(u)}finally{r.f()}var c=function(t){var r;if(!t){var i=e._editor.getPosition();t=e._editor.getModel().getLineContent(i.lineNumber).substr(0,i.column-1)}var o="";Object(ht.G)(t.charCodeAt(t.length-1))?Object(ht.F)(t.charCodeAt(t.length-2))&&(o=t.substr(t.length-2)):o=t.charAt(t.length-1);var a=n.get(o);if(a){var s=null===(r=e._completionModel)||void 0===r?void 0:r.adopt(a);e.trigger({auto:!0,shy:!1,triggerCharacter:o},Boolean(e._completionModel),a,s)}};this._triggerCharacterListener.add(this._editor.onDidType(c)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(c))}}},{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];0!==this._state&&(this._triggerQuickSuggest.cancel(),this._requestToken&&(this._requestToken.cancel(),this._requestToken=void 0),this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}},{key:"clear",value:function(){this._completionDisposables.clear()}},{key:"_updateActiveSuggestSession",value:function(){0!==this._state&&(this._editor.hasModel()&&vt.d.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}},{key:"_onCursorChange",value:function(e){var t=this;if(this._editor.hasModel()){var n=this._editor.getModel(),r=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(vt.d.has(n)&&0===this._state){if(!1===this._editor.getOption(70))return;if(!r.containsRange(this._currentSelection)&&!r.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(96).snippetsPreventQuickSuggestions&&Dp.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet((function(){if(0===t._state&&Kp.shouldAutoTrigger(t._editor)&&t._editor.hasModel()){var e=t._editor.getModel(),n=t._editor.getPosition(),r=t._editor.getOption(70);if(!1!==r){if(!0===r);else{e.tokenizeIfCheap(n.lineNumber);var i=e.getLineTokens(n.lineNumber),o=i.getStandardTokenType(i.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(!(r.other&&0===o||r.comments&&1===o||r.strings&&2===o))return}t.trigger({auto:!0,shy:!1})}}}),this._quickSuggestDelay)}}}},{key:"_refilterCompletionItems",value:function(){var e=this;Promise.resolve().then((function(){if(0!==e._state&&e._editor.hasModel()){var t=e._editor.getModel(),n=e._editor.getPosition(),r=new Kp(t,n,2===e._state,!1);e._onNewContext(r)}}))}},{key:"trigger",value:function(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if(this._editor.hasModel()){var s=this._editor.getModel(),l=t.auto,c=new Kp(s,this._editor.getPosition(),l,t.shy);this.cancel(i),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:t.shy,position:this._editor.getPosition()}),this._context=c;var u={triggerKind:null!==(n=t.triggerKind)&&void 0!==n?n:0};t.triggerCharacter&&(u={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new pt.b;var d=this._editor.getOption(93),h=1;switch(d){case"top":h=0;break;case"bottom":h=2}var f=e._createItemKindFilter(this._editor),p=Gp.create(this._editorWorkerService,this._editor),g=lp(s,this._editor.getPosition(),new ap(h,f,o),u,this._requestToken.token);Promise.all([g,p]).then((function(e){var n=Object(ke.a)(e,2),i=n[0],o=n[1];return qp(r,void 0,void 0,G.a.mark((function e(){var n,r,s,c,u;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Object(we.f)(this._requestToken),0!==this._state){e.next=3;break}return e.abrupt("return");case 3:if(this._editor.hasModel()){e.next=5;break}return e.abrupt("return");case 5:if(!i.needsClipboard&&!Object(ne.o)(a)){e.next=9;break}return e.next=8,this._clipboardService.readText();case 8:n=e.sent;case 9:r=this._editor.getModel(),s=i.items,Object(ne.o)(a)&&(c=dp(h),s=s.concat(a).sort(c)),u=new Kp(r,this._editor.getPosition(),l,t.shy),this._completionModel=new Vp(s,this._context.column,{leadingLineContent:u.leadingLineContent,characterCountDelta:u.column-this._context.column},o,this._editor.getOption(96),this._editor.getOption(93),n),this._completionDisposables.add(i.dispoables),this._onNewContext(u);case 16:case"end":return e.stop()}}),e,this)})))})).catch(ie.e)}}},{key:"_onNewContext",value:function(e){if(this._context)if(e.lineNumber===this._context.lineNumber){if(e.leadingWord.startColumnthis._context.leadingWord.startColumn){var t=new Set(vt.d.all(this._editor.getModel()));this._completionModel.allProvider.forEach((function(e){return t.delete(e)}));var n=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,t,n)}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var r=this._completionModel.incomplete,i=this._completionModel.adopt(r);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,r,i)}else{var o=this._completionModel.lineContext,a=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(Kp.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:a})}}else this.cancel()}},{key:"state",get:function(){return this._state}}],[{key:"_createItemKindFilter",value:function(e){var t=new Set;"none"===e.getOption(93)&&t.add(27);var n=e.getOption(96);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),t}}]),e}(),$p=(n(507),n(508),n(176),n(509),n(510),Object(Le.gc)("symbolIcon.arrayForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))),Qp=Object(Le.gc)("symbolIcon.booleanForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zp=Object(Le.gc)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Z.a)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Xp=Object(Le.gc)("symbolIcon.colorForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jp=Object(Le.gc)("symbolIcon.constantForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eg=Object(Le.gc)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Z.a)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tg=Object(Le.gc)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Z.a)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ng=Object(Le.gc)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Z.a)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rg=Object(Le.gc)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Z.a)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ig=Object(Le.gc)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Z.a)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),og=Object(Le.gc)("symbolIcon.fileForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ag=Object(Le.gc)("symbolIcon.folderForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sg=Object(Le.gc)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Z.a)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lg=Object(Le.gc)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Z.a)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cg=Object(Le.gc)("symbolIcon.keyForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ug=Object(Le.gc)("symbolIcon.keywordForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),dg=Object(Le.gc)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Z.a)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hg=Object(Le.gc)("symbolIcon.moduleForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fg=Object(Le.gc)("symbolIcon.namespaceForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pg=Object(Le.gc)("symbolIcon.nullForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gg=Object(Le.gc)("symbolIcon.numberForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mg=Object(Le.gc)("symbolIcon.objectForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vg=Object(Le.gc)("symbolIcon.operatorForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_g=Object(Le.gc)("symbolIcon.packageForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bg=Object(Le.gc)("symbolIcon.propertyForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yg=Object(Le.gc)("symbolIcon.referenceForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sg=Object(Le.gc)("symbolIcon.snippetForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cg=Object(Le.gc)("symbolIcon.stringForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kg=Object(Le.gc)("symbolIcon.structForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Eg=Object(Le.gc)("symbolIcon.textForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wg=Object(Le.gc)("symbolIcon.typeParameterForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Og=Object(Le.gc)("symbolIcon.unitForeground",{dark:Le.ab,light:Le.ab,hc:Le.ab},Object(Z.a)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tg=Object(Le.gc)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Z.a)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(Ae.g)((function(e,t){var n=e.getColor($p);n&&t.addRule("".concat(re.a.symbolArray.cssSelector," { color: ").concat(n,"; }"));var r=e.getColor(Qp);r&&t.addRule("".concat(re.a.symbolBoolean.cssSelector," { color: ").concat(r,"; }"));var i=e.getColor(Zp);i&&t.addRule("".concat(re.a.symbolClass.cssSelector," { color: ").concat(i,"; }"));var o=e.getColor(dg);o&&t.addRule("".concat(re.a.symbolMethod.cssSelector," { color: ").concat(o,"; }"));var a=e.getColor(Xp);a&&t.addRule("".concat(re.a.symbolColor.cssSelector," { color: ").concat(a,"; }"));var s=e.getColor(Jp);s&&t.addRule("".concat(re.a.symbolConstant.cssSelector," { color: ").concat(s,"; }"));var l=e.getColor(eg);l&&t.addRule("".concat(re.a.symbolConstructor.cssSelector," { color: ").concat(l,"; }"));var c=e.getColor(tg);c&&t.addRule("\n\t\t\t".concat(re.a.symbolValue.cssSelector,",").concat(re.a.symbolEnum.cssSelector," { color: ").concat(c,"; }"));var u=e.getColor(ng);u&&t.addRule("".concat(re.a.symbolEnumMember.cssSelector," { color: ").concat(u,"; }"));var d=e.getColor(rg);d&&t.addRule("".concat(re.a.symbolEvent.cssSelector," { color: ").concat(d,"; }"));var h=e.getColor(ig);h&&t.addRule("".concat(re.a.symbolField.cssSelector," { color: ").concat(h,"; }"));var f=e.getColor(og);f&&t.addRule("".concat(re.a.symbolFile.cssSelector," { color: ").concat(f,"; }"));var p=e.getColor(ag);p&&t.addRule("".concat(re.a.symbolFolder.cssSelector," { color: ").concat(p,"; }"));var g=e.getColor(sg);g&&t.addRule("".concat(re.a.symbolFunction.cssSelector," { color: ").concat(g,"; }"));var m=e.getColor(lg);m&&t.addRule("".concat(re.a.symbolInterface.cssSelector," { color: ").concat(m,"; }"));var v=e.getColor(cg);v&&t.addRule("".concat(re.a.symbolKey.cssSelector," { color: ").concat(v,"; }"));var _=e.getColor(ug);_&&t.addRule("".concat(re.a.symbolKeyword.cssSelector," { color: ").concat(_,"; }"));var b=e.getColor(hg);b&&t.addRule("".concat(re.a.symbolModule.cssSelector," { color: ").concat(b,"; }"));var y=e.getColor(fg);y&&t.addRule("".concat(re.a.symbolNamespace.cssSelector," { color: ").concat(y,"; }"));var S=e.getColor(pg);S&&t.addRule("".concat(re.a.symbolNull.cssSelector," { color: ").concat(S,"; }"));var C=e.getColor(gg);C&&t.addRule("".concat(re.a.symbolNumber.cssSelector," { color: ").concat(C,"; }"));var k=e.getColor(mg);k&&t.addRule("".concat(re.a.symbolObject.cssSelector," { color: ").concat(k,"; }"));var E=e.getColor(vg);E&&t.addRule("".concat(re.a.symbolOperator.cssSelector," { color: ").concat(E,"; }"));var w=e.getColor(_g);w&&t.addRule("".concat(re.a.symbolPackage.cssSelector," { color: ").concat(w,"; }"));var O=e.getColor(bg);O&&t.addRule("".concat(re.a.symbolProperty.cssSelector," { color: ").concat(O,"; }"));var T=e.getColor(yg);T&&t.addRule("".concat(re.a.symbolReference.cssSelector," { color: ").concat(T,"; }"));var x=e.getColor(Sg);x&&t.addRule("".concat(re.a.symbolSnippet.cssSelector," { color: ").concat(x,"; }"));var N=e.getColor(Cg);N&&t.addRule("".concat(re.a.symbolString.cssSelector," { color: ").concat(N,"; }"));var D=e.getColor(kg);D&&t.addRule("".concat(re.a.symbolStruct.cssSelector," { color: ").concat(D,"; }"));var L=e.getColor(Eg);L&&t.addRule("".concat(re.a.symbolText.cssSelector," { color: ").concat(L,"; }"));var A=e.getColor(wg);A&&t.addRule("".concat(re.a.symbolTypeParameter.cssSelector," { color: ").concat(A,"; }"));var I=e.getColor(Og);I&&t.addRule("".concat(re.a.symbolUnit.cssSelector," { color: ").concat(I,"; }"));var R=e.getColor(Tg);R&&t.addRule("".concat(re.a.symbolVariable.cssSelector," { color: ").concat(R,"; }"))}));var xg,Ng=n(119),Dg=n(160);function Lg(e,t,n,r){var i=r===xg.ROOT_FOLDER?["rootfolder-icon"]:r===xg.FOLDER?["folder-icon"]:["file-icon"];if(n){var o;if(n.scheme===pl.b.data)o=gn.a.parseMetaData(n).get(gn.a.META_DATA_LABEL);else o=Ag(Object(gn.c)(n).toLowerCase());if(r===xg.FOLDER)i.push("".concat(o,"-name-folder-icon"));else{if(o){i.push("".concat(o,"-name-file-icon"));for(var a=o.split("."),s=1;s=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Rg=function(e,t){return function(n,r){t(n,r,e)}},Mg=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Pg=Object(re.e)("suggest-more-info",re.a.chevronRight),jg=Object(Le.gc)("editorSuggestWidget.background",{dark:Le.U,light:Le.U,hc:Le.U},Z.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),Fg=Object(Le.gc)("editorSuggestWidget.border",{dark:Le.V,light:Le.V,hc:Le.V},Z.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),Bg=Object(Le.gc)("editorSuggestWidget.foreground",{dark:Le.B,light:Le.B,hc:Le.B},Z.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Ug=Object(Le.gc)("editorSuggestWidget.selectedBackground",{dark:Le.xb,light:Le.xb,hc:Le.xb},Z.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Hg=Object(Le.gc)("editorSuggestWidget.highlightForeground",{dark:Le.zb,light:Le.zb,hc:Le.zb},Z.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),zg=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function Vg(e){if(!e)return!1;var t=e.completion;return!!t.documentation||t.detail&&t.detail!==t.label}function Wg(e){return"suggest-aria-id:".concat(e)}var Gg=function(){function e(t,n,r,i,o,a){Object(Y.a)(this,e),this.widget=t,this.editor=n,this.triggerKeybindingLabel=r,this._modelService=i,this._modeService=o,this._themeService=a}return Object($.a)(e,[{key:"renderTemplate",value:function(e){var t=this,n=Object.create(null);n.disposables=new we.b,n.root=e,n.root.classList.add("show-file-icons"),n.icon=Object(zt.append)(e,Object(zt.$)(".icon")),n.colorspan=Object(zt.append)(n.icon,Object(zt.$)("span.colorspan"));var r=Object(zt.append)(e,Object(zt.$)(".contents")),i=Object(zt.append)(r,Object(zt.$)(".main"));n.iconContainer=Object(zt.append)(i,Object(zt.$)(".icon-label.codicon")),n.left=Object(zt.append)(i,Object(zt.$)("span.left")),n.right=Object(zt.append)(i,Object(zt.$)("span.right")),n.iconLabel=new gl.a(n.left,{supportHighlights:!0,supportCodicons:!0}),n.disposables.add(n.iconLabel),n.parametersLabel=Object(zt.append)(n.left,Object(zt.$)("span.signature-label")),n.qualifierLabel=Object(zt.append)(n.left,Object(zt.$)("span.qualifier-label")),n.detailsLabel=Object(zt.append)(n.right,Object(zt.$)("span.details-label")),n.readMore=Object(zt.append)(n.right,Object(zt.$)("span.readMore"+Pg.cssSelector)),n.readMore.title=Z.a("readMore","Read More ({0})",this.triggerKeybindingLabel);var o=function(){var e=t.editor.getOptions(),r=e.get(36),o=r.fontFamily,a=r.fontFeatureSettings,s=e.get(97)||r.fontSize,l=e.get(98)||r.lineHeight,c=r.fontWeight,u="".concat(s,"px"),d="".concat(l,"px");n.root.style.fontSize=u,n.root.style.fontWeight=c,i.style.fontFamily=o,i.style.fontFeatureSettings=a,i.style.lineHeight=d,n.icon.style.height=d,n.icon.style.width=d,n.readMore.style.height=d,n.readMore.style.width=d};return o(),n.disposables.add(en.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.hasChanged(36)||e.hasChanged(97)||e.hasChanged(98)})).on(o,null)),n}},{key:"renderElement",value:function(e,t,n){var r=this,i=n,o=e.completion,a="string"===typeof o.label?o.label:o.label.name;i.root.id=Wg(t),i.colorspan.style.backgroundColor="";var s={labelEscapeNewLines:!0,matches:Object(wl.c)(e.score)},l=[];if(19===o.kind&&function(e,t){var n="string"===typeof e.completion.label?e.completion.label:e.completion.label.name;return n.match(zg)?(t[0]=n,!0):!("string"!==typeof e.completion.documentation||!e.completion.documentation.match(zg))&&(t[0]=e.completion.documentation,!0)}(e,l))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=l[0];else if(20===o.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";var c=Lg(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:a}),xg.FILE),u=Lg(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:o.detail}),xg.FILE);s.extraClasses=c.length>u.length?c:u}else 23===o.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=Object(ne.l)([Lg(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:a}),xg.FOLDER),Lg(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:o.detail}),xg.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",Object(zt.addClasses)(i.iconContainer,"suggest-icon ".concat(Object(vt.F)(o.kind))));o.tags&&o.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(a,void 0,s),"string"===typeof o.label?(i.parametersLabel.textContent="",i.qualifierLabel.textContent="",i.detailsLabel.textContent=(o.detail||"").replace(/\n.*$/m,""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=(o.label.parameters||"").replace(/\n.*$/m,""),i.qualifierLabel.textContent=(o.label.qualifier||"").replace(/\n.*$/m,""),i.detailsLabel.textContent=(o.label.type||"").replace(/\n.*$/m,""),i.root.classList.remove("string-label")),Vg(e)?(i.right.classList.add("can-expand-details"),Object(zt.show)(i.readMore),i.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},i.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),r.widget.toggleDetails()}):(i.right.classList.remove("can-expand-details"),Object(zt.hide)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}},{key:"disposeTemplate",value:function(e){e.disposables.dispose()}},{key:"templateId",get:function(){return"suggestion"}}]),e}();Gg=Ig([Rg(3,_t.a),Rg(4,Pc.a),Rg(5,Ae.c)],Gg);var qg=function(){function e(t,n,r,i,o){var a=this;Object(Y.a)(this,e),this.widget=n,this.editor=r,this.markdownRenderer=i,this.kbToggleDetails=o,this.borderWidth=1,this.disposables=new we.b,this.el=Object(zt.append)(t,Object(zt.$)(".details")),this.disposables.add(Object(we.h)((function(){return t.removeChild(a.el)}))),this.body=Object(zt.$)(".body"),this.scrollbar=new Kc.a(this.body,{}),Object(zt.append)(this.el,this.scrollbar.getDomNode()),this.disposables.add(this.scrollbar),this.header=Object(zt.append)(this.body,Object(zt.$)(".header")),this.close=Object(zt.append)(this.header,Object(zt.$)("span"+re.a.close.cssSelector)),this.close.title=Z.a("readLess","Read Less ({0})",this.kbToggleDetails),this.type=Object(zt.append)(this.header,Object(zt.$)("p.type")),this.docs=Object(zt.append)(this.body,Object(zt.$)("p.docs")),this.configureFont(),en.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.hasChanged(36)})).on(this.configureFont,this,this.disposables),i.onDidRenderCodeBlock((function(){return a.scrollbar.scanDomNode()}),this,this.disposables)}return Object($.a)(e,[{key:"renderLoading",value:function(){this.type.textContent=Z.a("loading","Loading..."),this.docs.textContent=""}},{key:"renderItem",value:function(e,t){var n=this;Object(we.f)(this.renderDisposeable),this.renderDisposeable=void 0;var r=e.completion,i=r.documentation,o=r.detail;if(t){var a="";a+="score: ".concat(e.score[0]).concat(e.word?", compared '".concat(e.completion.filterText&&e.completion.filterText+" (filterText)"||e.completion.label,"' with '").concat(e.word,"'"):" (no prefix)","\n"),a+="distance: ".concat(e.distance,", see localityBonus-setting\n"),a+="index: ".concat(e.idx,", based on ").concat(e.completion.sortText&&'sortText: "'.concat(e.completion.sortText,'"')||"label","\n"),i=(new oe).appendCodeblock("empty",a),o="Provider: ".concat(e.provider._debugDisplayName)}if(!t&&!Vg(e))return this.type.textContent="",this.docs.textContent="",void this.el.classList.add("no-docs");if(this.el.classList.remove("no-docs"),"string"===typeof i)this.docs.classList.remove("markdown-docs"),this.docs.textContent=i;else{this.docs.classList.add("markdown-docs"),this.docs.innerText="";var s=this.markdownRenderer.render(i);this.renderDisposeable=s,this.docs.appendChild(s.element)}o?(this.type.innerText=o.length>1e5?"".concat(o.substr(0,1e5),"\u2026"):o,Object(zt.show)(this.type)):(this.type.innerText="",Object(zt.hide)(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.el.style.userSelect="text",this.el.tabIndex=-1,this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),n.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode()}},{key:"scrollDown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;this.body.scrollTop+=e}},{key:"scrollUp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;this.body.scrollTop-=e}},{key:"scrollTop",value:function(){this.body.scrollTop=0}},{key:"scrollBottom",value:function(){this.body.scrollTop=this.body.scrollHeight}},{key:"pageDown",value:function(){this.scrollDown(80)}},{key:"pageUp",value:function(){this.scrollUp(80)}},{key:"setBorderWidth",value:function(e){this.borderWidth=e}},{key:"configureFont",value:function(){var e=this.editor.getOptions(),t=e.get(36),n=t.fontFamily,r=e.get(97)||t.fontSize,i=e.get(98)||t.lineHeight,o=t.fontWeight,a="".concat(r,"px"),s="".concat(i,"px");this.el.style.fontSize=a,this.el.style.fontWeight=o,this.el.style.fontFeatureSettings=t.fontFeatureSettings,this.type.style.fontFamily=n,this.close.style.height=s,this.close.style.width=s}},{key:"dispose",value:function(){this.disposables.dispose(),Object(we.f)(this.renderDisposeable),this.renderDisposeable=void 0}},{key:"element",get:function(){return this.el}}]),e}(),Kg=function(){function e(t,n,r,i,o,a,s,l,c,u){var d,h,f=this;Object(Y.a)(this,e),this.editor=t,this.telemetryService=n,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.state=0,this.isAddedAsContentWidget=!1,this.isAuto=!1,this.loadingTimeout=we.a.None,this.currentSuggestionDetails=null,this.ignoreFocusEvents=!1,this.completionModel=null,this.showTimeout=new Ee.e,this.toDispose=new we.b,this.onDidSelectEmitter=new en.a,this.onDidFocusEmitter=new en.a,this.onDidHideEmitter=new en.a,this.onDidShowEmitter=new en.a,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.firstFocusInCurrentList=!1,this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.explainMode=!1,this._onDetailsKeydown=new en.a,this.onDetailsKeyDown=this._onDetailsKeydown.event;var p=this.toDispose.add(new Yu(t,s,l)),g=null!==(h=null===(d=r.lookupKeybinding("toggleSuggestionDetails"))||void 0===d?void 0:d.getLabel())&&void 0!==h?h:"";this.isAuto=!1,this.focusedItem=null,this.storageService=a,this.element=Object(zt.$)(".editor-widget.suggest-widget"),this.toDispose.add(Object(zt.addDisposableListener)(this.element,"click",(function(e){e.target===f.element&&f.hideWidget()}))),this.messageElement=Object(zt.append)(this.element,Object(zt.$)(".message")),this.listElement=Object(zt.append)(this.element,Object(zt.$)(".tree"));var m=function(){return f.element.classList.toggle("with-status-bar",f.editor.getOption(96).statusBar.visible)};m(),this.statusBarElement=Object(zt.append)(this.element,Object(zt.$)(".suggest-status-bar"));var v=function(e){var t=r.lookupKeybindings(e.id);return new(function(n){Object(q.a)(i,n);var r=Object(K.a)(i);function i(){return Object(Y.a)(this,i),r.call(this,void 0,e,{label:!0,icon:!1})}return Object($.a)(i,[{key:"updateLabel",value:function(){if(Object(ne.n)(t)||!this.label)return Object(Rt.a)(Object(Mt.a)(i.prototype),"updateLabel",this).call(this);var e=this.getAction().label;this.label.textContent=/{\d}/.test(e)?ht.x(this.getAction().label,t[0].getLabel()):"".concat(this.getAction().label," (").concat(t[0].getLabel(),")")}}]),i}(vr.a))},_=new ms.a(this.statusBarElement,{actionViewItemProvider:v}),b=new ms.a(this.statusBarElement,{actionViewItemProvider:v}),y=c.createMenu(ip,i);this.toDispose.add(y.onDidChange((function(){return function(){var e,t=[],n=[],r=Object(Ce.a)(y.getActions());try{for(r.s();!(e=r.n()).done;){var i=Object(ke.a)(e.value,2),o=i[0],a=i[1];"left"===o?t.push.apply(t,Object(ct.a)(a)):n.push.apply(n,Object(ct.a)(a))}}catch(s){r.e(s)}finally{r.f()}_.clear(),_.push(t),b.clear(),b.push(n)}()}))),this.toDispose.add(y),this.details=u.createInstance(qg,this.element,this,this.editor,p,g);var S=function(){return f.element.classList.toggle("no-icons",!f.editor.getOption(96).showIcons)};S();var C=u.createInstance(Gg,this,this.editor,g);this.list=new Ng.c("SuggestWidget",this.listElement,this,[C],{useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:function(){return"option"},getAriaLabel:function(e){var t="string"===typeof e.completion.label?e.completion.label:e.completion.label.name;if(e.isResolved&&f.expandDocsSettingFromStorage()){var n=e.completion,r=n.documentation,i=n.detail,o=ht.x("{0}{1}",i||"",r?"string"===typeof r?r:r.value:"");return Z.a("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,o)}return t},getWidgetAriaLabel:function(){return Z.a("suggest","Suggest")},getWidgetRole:function(){return"listbox"}}}),this.toDispose.add(Object(_l.b)(this.list,o,{listInactiveFocusBackground:Ug,listInactiveFocusOutline:Le.b})),this.toDispose.add(o.onDidColorThemeChange((function(e){return f.onThemeChange(e)}))),this.toDispose.add(t.onDidLayoutChange((function(){return f.onEditorLayoutChange()}))),this.toDispose.add(this.list.onMouseDown((function(e){return f.onListMouseDownOrTap(e)}))),this.toDispose.add(this.list.onTap((function(e){return f.onListMouseDownOrTap(e)}))),this.toDispose.add(this.list.onDidChangeSelection((function(e){return f.onListSelection(e)}))),this.toDispose.add(this.list.onDidChangeFocus((function(e){return f.onListFocus(e)}))),this.toDispose.add(this.editor.onDidChangeCursorSelection((function(){return f.onCursorSelectionChanged()}))),this.toDispose.add(this.editor.onDidChangeConfiguration((function(e){e.hasChanged(96)&&(m(),S())}))),this.ctxSuggestWidgetVisible=rp.Visible.bindTo(i),this.ctxSuggestWidgetDetailsVisible=rp.DetailsVisible.bindTo(i),this.ctxSuggestWidgetMultipleSuggestions=rp.MultipleSuggestions.bindTo(i),this.onThemeChange(o.getColorTheme()),this.toDispose.add(Object(zt.addStandardDisposableListener)(this.details.element,"keydown",(function(e){f._onDetailsKeydown.fire(e)}))),this.toDispose.add(this.editor.onMouseDown((function(e){return f.onEditorMouseDown(e)})))}return Object($.a)(e,[{key:"onEditorMouseDown",value:function(e){this.details.element.contains(e.target.element)?this.details.element.focus():this.element.contains(e.target.element)&&this.editor.focus()}},{key:"onCursorSelectionChanged",value:function(){0!==this.state&&this.editor.layoutContentWidget(this)}},{key:"onEditorLayoutChange",value:function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()}},{key:"onListMouseDownOrTap",value:function(e){"undefined"!==typeof e.element&&"undefined"!==typeof e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this.select(e.element,e.index))}},{key:"onListSelection",value:function(e){e.elements.length&&this.select(e.elements[0],e.indexes[0])}},{key:"select",value:function(e,t){var n=this.completionModel;n&&(this.onDidSelectEmitter.fire({item:e,index:t,model:n}),this.editor.focus())}},{key:"onThemeChange",value:function(e){var t=e.getColor(jg);t&&(this.listElement.style.backgroundColor=t.toString(),this.statusBarElement.style.backgroundColor=t.toString(),this.details.element.style.backgroundColor=t.toString(),this.messageElement.style.backgroundColor=t.toString());var n=e.getColor(Fg);n&&(this.listElement.style.borderColor=n.toString(),this.statusBarElement.style.borderColor=n.toString(),this.details.element.style.borderColor=n.toString(),this.messageElement.style.borderColor=n.toString(),this.detailsBorderColor=n.toString());var r=e.getColor(Le.Z);r&&(this.detailsFocusBorderColor=r.toString()),this.details.setBorderWidth("hc"===e.type?2:1)}},{key:"onListFocus",value:function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this.editor.setAriaOptions({activeDescendant:void 0});if(this.completionModel){var n=e.elements[0],r=e.indexes[0];this.firstFocusInCurrentList=!this.focusedItem,n!==this.focusedItem&&(this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.focusedItem=n,this.list.reveal(r),this.currentSuggestionDetails=Object(Ee.f)((function(e){return Mg(t,void 0,void 0,G.a.mark((function t(){var r,i,o=this;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Ee.g)((function(){return o.showDetails(!0)}),250),e.onCancellationRequested((function(){return r.dispose()})),t.next=4,n.resolve(e);case 4:return i=t.sent,r.dispose(),t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))})),this.currentSuggestionDetails.then((function(){r>=t.list.length||n!==t.list.element(r)||(t.ignoreFocusEvents=!0,t.list.splice(r,1,[n]),t.list.setFocus([r]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails(!1):t.element.classList.remove("docs-side"),t.editor.setAriaOptions({activeDescendant:Wg(r)}))})).catch(ie.e)),this.onDidFocusEmitter.fire({item:n,index:r,model:this.completionModel})}}}},{key:"setState",value:function(t){if(this.element){this.isAddedAsContentWidget||0===t||(this.isAddedAsContentWidget=!0,this.editor.addContentWidget(this));var n=this.state!==t;switch(this.state=t,this.element.classList.toggle("frozen",4===t),t){case 0:Object(zt.hide)(this.messageElement,this.details.element,this.listElement,this.statusBarElement),this.hide(),this.listHeight=0,n&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,Object(zt.hide)(this.listElement,this.details.element,this.statusBarElement),Object(zt.show)(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Object(zt.hide)(this.listElement,this.details.element,this.statusBarElement),Object(zt.show)(this.messageElement),this.element.classList.remove("docs-side"),this.show(),this.focusedItem=null;break;case 3:Object(zt.hide)(this.messageElement),Object(zt.show)(this.listElement,this.statusBarElement),this.show();break;case 4:Object(zt.hide)(this.messageElement),Object(zt.show)(this.listElement),this.show();break;case 5:Object(zt.hide)(this.messageElement),Object(zt.show)(this.details.element,this.listElement,this.statusBarElement),this.show()}}}},{key:"showTriggered",value:function(e,t){var n=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=Object(Ee.g)((function(){return n.setState(1)}),t)))}},{key:"showSuggestions",value:function(e,t,n,r){if(this.preferDocPositionTop=!1,this.docsPositionPreviousWidgetY=null,this.loadingTimeout.dispose(),this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null),this.completionModel!==e&&(this.completionModel=e),n&&2!==this.state&&0!==this.state)this.setState(4);else{var i=this.completionModel.items.length,o=0===i;if(this.ctxSuggestWidgetMultipleSuggestions.set(i>1),o)r?this.setState(0):this.setState(2),this.completionModel=null;else{if(3!==this.state){var a=this.completionModel.stats;a.wasAutomaticallyTriggered=!!r,this.telemetryService.publicLog("suggestWidget",Object.assign({},a))}this.focusedItem=null,this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,0),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}}},{key:"selectNextPage",value:function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}}},{key:"selectNext",value:function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}}},{key:"selectLast",value:function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}}},{key:"selectPreviousPage",value:function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}}},{key:"selectPrevious",value:function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}}},{key:"selectFirst",value:function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}}},{key:"getFocusedItem",value:function(){if(0!==this.state&&2!==this.state&&1!==this.state&&this.completionModel)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}}},{key:"toggleDetailsFocus",value:function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog2("suggestWidget:toggleDetailsFocus")}},{key:"toggleDetails",value:function(){if(Vg(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.ctxSuggestWidgetDetailsVisible.set(!1),this.updateExpandDocsSetting(!1),Object(zt.hide)(this.details.element),this.element.classList.remove("docs-side","doc-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog2("suggestWidget:collapseDetails");else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.ctxSuggestWidgetDetailsVisible.set(!0),this.updateExpandDocsSetting(!0),this.showDetails(!1),this.telemetryService.publicLog2("suggestWidget:expandDetails")}}},{key:"showDetails",value:function(e){e||this.expandSideOrBelow(),Object(zt.show)(this.details.element),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",e?this.details.renderLoading():this.details.renderItem(this.list.getFocusedElements()[0],this.explainMode),this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus()}},{key:"toggleExplainMode",value:function(){this.list.getFocusedElements()[0]&&this.expandDocsSettingFromStorage()&&(this.explainMode=!this.explainMode,this.showDetails(!1))}},{key:"show",value:function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.ctxSuggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){e.element.classList.add("visible"),e.onDidShowEmitter.fire(e)}),100)}},{key:"hide",value:function(){this.editor.layoutContentWidget(this),this.ctxSuggestWidgetVisible.reset(),this.ctxSuggestWidgetMultipleSuggestions.reset(),this.element.classList.remove("visible")}},{key:"hideWidget",value:function(){this.loadingTimeout.dispose(),this.setState(0),this.onDidHideEmitter.fire(this)}},{key:"getPosition",value:function(){if(0===this.state)return null;var e=[2,1];return this.preferDocPositionTop&&(e=[1]),{position:this.editor.getPosition(),preference:e}}},{key:"getDomNode",value:function(){return this.element}},{key:"getId",value:function(){return e.ID}},{key:"isFrozen",value:function(){return 4===this.state}},{key:"updateListHeight",value:function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight,n=this.editor.getOption(96).maxVisibleSuggestions;e=Math.min(t,n)*this.unfocusedHeight}return this.element.style.lineHeight="".concat(this.unfocusedHeight,"px"),this.listElement.style.height="".concat(e,"px"),this.statusBarElement.style.top="".concat(e,"px"),this.list.layout(e),e}},{key:"adjustDocsPosition",value:function(){if(this.editor.hasModel()){var e=this.editor.getOption(51),t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=Object(zt.getDomNodePagePosition)(this.editor.getDomNode()),r=n.left+t.left,i=n.top+t.top+t.height,o=Object(zt.getDomNodePagePosition)(this.element),a=o.left,s=o.top;if(this.docsPositionPreviousWidgetY&&this.docsPositionPreviousWidgetYs&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop="".concat(this.details.element.offsetHeight-this.listElement.offsetHeight,"px"))}}},{key:"expandSideOrBelow",value:function(){if(Vg(this.focusedItem)||!this.firstFocusInCurrentList){var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},$g=function(e,t){return function(n,r){t(n,r,e)}},Qg=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._editor=e,i._enabled=!1,i._ckAtEnd=n.AtEnd.bindTo(r),i._register(i._editor.onDidChangeConfiguration((function(e){return e.hasChanged(101)&&i._update()}))),i._update(),i}return Object($.a)(n,[{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),Object(we.f)(this._selectionListener),this._ckAtEnd.reset()}},{key:"_update",value:function(){var e=this,t="on"===this._editor.getOption(101);if(this._enabled!==t)if(this._enabled=t,this._enabled){var n=function(){if(e._editor.hasModel()){var t=e._editor.getModel(),n=e._editor.getSelection(),r=t.getWordAtPosition(n.getStartPosition());r?e._ckAtEnd.set(r.endColumn===n.getStartPosition().column):e._ckAtEnd.set(!1)}else e._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(n),n()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}}]),n}(we.a);Qg.AtEnd=new te.c("atEndOfWord",!1),Qg=Yg([$g(1,te.b)],Qg);var Zg=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._disposables=new we.b,this._disposables.add(n.onDidShow((function(){return i._onItem(n.getFocusedItem())}))),this._disposables.add(n.onDidFocus(this._onItem,this)),this._disposables.add(n.onDidHide(this.reset,this)),this._disposables.add(t.onWillType((function(e){if(i._active&&!n.isFrozen()){var o=e.charCodeAt(e.length-1);i._active.acceptCharacters.has(o)&&t.getOption(0)&&r(i._active.item)}})))}return Object($.a)(e,[{key:"_onItem",value:function(e){if(e&&Object(ne.o)(e.item.completion.commitCharacters)){if(!this._active||this._active.item.item!==e.item){var t,n=new Ma.b,r=Object(Ce.a)(e.item.completion.commitCharacters);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.length>0&&n.add(i.charCodeAt(0))}}catch(o){r.e(o)}finally{r.f()}this._active={acceptCharacters:n,item:e}}}else this.reset()}},{key:"reset",value:function(){this._active=void 0}},{key:"dispose",value:function(){this._disposables.dispose()}}]),e}(),Xg=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._disposables=new we.b,this._lastOvertyped=[],this._empty=!0,this._disposables.add(t.onWillType((function(){if(r._empty&&t.hasModel()){for(var n=t.getSelections(),i=n.length,o=!1,a=0;ae._maxSelectionLength)return;r._lastOvertyped[l]={value:s.getValueInRange(c),multiline:c.startLineNumber!==c.endLineNumber}}r._empty=!1}}}))),this._disposables.add(n.onDidCancel((function(e){r._empty||(r._empty=!0)})))}return Object($.a)(e,[{key:"getLastOvertypedInfo",value:function(e){if(!this._empty&&e>=0&&e=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},tm=function(e,t){return function(n,r){t(n,r,e)}},nm=function(){function e(t,n){if(Object(Y.a)(this,e),this._model=t,this._position=n,t.getLineMaxColumn(n.lineNumber)!==n.column){var r=t.getOffsetAt(n),i=t.getPositionAt(r+1);this._marker=t.deltaDecorations([],[{range:Te.a.fromPositions(n,i),options:{stickiness:1}}])}}return Object($.a)(e,[{key:"dispose",value:function(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}},{key:"delta",value:function(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){var t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}]),e}(),rm=function(){function e(t,n,r,i,o,a,s,l){var c=this;Object(Y.a)(this,e),this._memoryService=r,this._commandService=i,this._contextKeyService=o,this._instantiationService=a,this._logService=s,this._lineSuffix=new we.d,this._toDispose=new we.b,this.editor=t,this.model=new Yp(this.editor,n,l),this.widget=this._toDispose.add(new Ee.b((function(){var e=c._instantiationService.createInstance(Kg,c.editor);c._toDispose.add(e),c._toDispose.add(e.onDidSelect((function(e){return c._insertSuggestion(e,0)}),c));var t=new Zg(c.editor,e,(function(e){return c._insertSuggestion(e,2)}));c._toDispose.add(t),c._toDispose.add(c.model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var n=rp.MakesTextEdit.bindTo(c._contextKeyService),r=rp.HasInsertAndReplaceRange.bindTo(c._contextKeyService),i=rp.CanResolve.bindTo(c._contextKeyService);return c._toDispose.add(Object(we.h)((function(){n.reset(),r.reset(),i.reset()}))),c._toDispose.add(e.onDidFocus((function(e){var t=e.item,o=c.editor.getPosition(),a=t.editStart.column,s=o.column,l=!0;"smart"!==c.editor.getOption(1)||2!==c.model.state||t.completion.command||t.completion.additionalTextEdits||4&t.completion.insertTextRules||s-a!==t.completion.insertText.length||(l=c.editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:a,endLineNumber:o.lineNumber,endColumn:s})!==t.completion.insertText);n.set(l),r.set(!Oe.a.equals(t.editInsertEnd,t.editReplaceEnd)),i.set(Boolean(t.provider.resolveCompletionItem)||Boolean(t.completion.documentation)||t.completion.detail!==t.completion.label)}))),c._toDispose.add(e.onDetailsKeyDown((function(e){e.toKeybinding().equals(new ee.e(!0,!1,!1,!1,33))||Ke.f&&e.toKeybinding().equals(new ee.e(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||c.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new Ee.b((function(){return c._toDispose.add(new Xg(c.editor,c.model))}))),this._alternatives=this._toDispose.add(new Ee.b((function(){return c._toDispose.add(new zp(c.editor,c._contextKeyService))}))),this._toDispose.add(a.createInstance(Qg,t)),this._toDispose.add(this.model.onDidTrigger((function(e){c.widget.value.showTriggered(e.auto,e.shy?250:50),c._lineSuffix.value=new nm(c.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((function(e){if(!e.shy){var t=c._memoryService.select(c.editor.getModel(),c.editor.getPosition(),e.completionModel.items);c.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((function(e){e.retrigger||c.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((function(){c.model.cancel(),c.model.clear()})));var u=rp.AcceptSuggestionsOnEnter.bindTo(o),d=function(){var e=c.editor.getOption(1);u.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((function(){return d()}))),d()}return Object($.a)(e,[{key:"dispose",value:function(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}},{key:"_insertSuggestion",value:function(e,t){var n=this;if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(this.editor.hasModel()){var r=this.editor.getModel(),i=r.getAlternativeVersionId(),o=e.item,a=[],s=new pt.b;1&t||this.editor.pushUndoStop();var l=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(r,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){var c=mt.c.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((function(e){return lr.a.replace(Te.a.lift(e.range),e.text)}))),c.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){var u,d=new Jg.a(!0),h=r.onDidChangeContent((function(e){if(e.isFlush)return s.cancel(),void h.dispose();var t,n=Object(Ce.a)(e.changes);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=Te.a.getEndPosition(r.range);u&&!Oe.a.isBefore(i,u)||(u=i)}}catch(o){n.e(o)}finally{n.f()}})),f=t;t|=2;var p=!1,g=this.editor.onWillType((function(){g.dispose(),p=!0,2&f||n.editor.pushUndoStop()}));a.push(o.resolve(s.token).then((function(){if(!o.completion.additionalTextEdits||s.token.isCancellationRequested)return!1;if(u&&o.completion.additionalTextEdits.some((function(e){return Oe.a.isBefore(u,Te.a.getStartPosition(e.range))})))return!1;p&&n.editor.pushUndoStop();var e=mt.c.capture(n.editor);return n.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((function(e){return lr.a.replace(Te.a.lift(e.range),e.text)}))),e.restoreRelativeVerticalPositionOfCursor(n.editor),!p&&2&f||n.editor.pushUndoStop(),!0})).then((function(e){n._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",d.elapsed(),e),h.dispose(),g.dispose()})))}var m=o.completion.insertText;if(4&o.completion.insertTextRules||(m=tp.escape(m)),Dp.get(this.editor).insert(m,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===im.id)this.model.trigger({auto:!0,shy:!1},!0);else{var v;a.push((v=this._commandService).executeCommand.apply(v,[o.completion.command.id].concat(Object(ct.a)(o.completion.command.arguments?Object(ct.a)(o.completion.command.arguments):[]))).catch(ie.e)),this.model.cancel()}else this.model.cancel();4&t&&this._alternatives.value.set(e,(function(e){for(s.cancel();r.canUndo();){i!==r.getAlternativeVersionId()&&r.undo(),n._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(a).finally((function(){n.model.clear(),s.dispose()}))}}},{key:"getOverwriteInfo",value:function(e,t){Object(Uo.b)(this.editor.hasModel());var n="replace"===this.editor.getOption(96).insertMode;t&&(n=!n);var r=e.position.column-e.editStart.column,i=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:r+(this.editor.getPosition().column-e.position.column),overwriteAfter:i+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}},{key:"_alertCompletionItem",value:function(e){var t=e.completion,n="string"===typeof t.label?t.label:t.label.name;if(Object(ne.o)(t.additionalTextEdits)){var r=Z.a("arai.alert.snippet","Accepting '{0}' made {1} additional edits",n,t.additionalTextEdits.length);Object(he.a)(r)}}},{key:"triggerSuggest",value:function(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}},{key:"triggerSuggestAndAcceptBest",value:function(e){var t=this;if(this.editor.hasModel()){var n=this.editor.getPosition(),r=function(){n.equals(t.editor.getPosition())&&t._commandService.executeCommand(e.fallback)};en.b.once(this.model.onDidTrigger)((function(e){var n=[];en.b.any(t.model.onDidTrigger,t.model.onDidCancel)((function(){Object(we.f)(n),r()}),void 0,n),t.model.onDidSuggest((function(e){var i=e.completionModel;if(Object(we.f)(n),0!==i.items.length){var o=t._memoryService.select(t.editor.getModel(),t.editor.getPosition(),i.items),a=i.items[o];!function(e){if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;var n=t.editor.getPosition(),r=e.editStart.column,i=n.column;return i-r!==e.completion.insertText.length||t.editor.getModel().getValueInRange({startLineNumber:n.lineNumber,startColumn:r,endLineNumber:n.lineNumber,endColumn:i})!==e.completion.insertText}(a)?r():(t.editor.pushUndoStop(),t._insertSuggestion({index:o,item:a,model:i},7))}else r()}),void 0,n)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(n.lineNumber,0),this.editor.focus()}}},{key:"acceptSelectedSuggestion",value:function(e,t){var n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}},{key:"acceptNextSuggestion",value:function(){this._alternatives.value.next()}},{key:"acceptPrevSuggestion",value:function(){this._alternatives.value.prev()}},{key:"cancelSuggestWidget",value:function(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}},{key:"selectNextSuggestion",value:function(){this.widget.value.selectNext()}},{key:"selectNextPageSuggestion",value:function(){this.widget.value.selectNextPage()}},{key:"selectLastSuggestion",value:function(){this.widget.value.selectLast()}},{key:"selectPrevSuggestion",value:function(){this.widget.value.selectPrevious()}},{key:"selectPrevPageSuggestion",value:function(){this.widget.value.selectPreviousPage()}},{key:"selectFirstSuggestion",value:function(){this.widget.value.selectFirst()}},{key:"toggleSuggestionDetails",value:function(){this.widget.value.toggleDetails()}},{key:"toggleExplainMode",value:function(){this.widget.value.toggleExplainMode()}},{key:"toggleSuggestionFocus",value:function(){this.widget.value.toggleDetailsFocus()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();rm.ID="editor.contrib.suggestController",rm=em([tm(1,Pa.a),tm(2,Bp),tm(3,dn.b),tm(4,te.b),tm(5,Ht.a),tm(6,bf.b),tm(7,Qe.a)],rm);var im=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.id,label:Z.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:te.a.and(X.a.writable,X.a.hasCompletionItemProvider),kbOpts:{kbExpr:X.a.textInputFocus,primary:2058,mac:{primary:266,secondary:[521]},weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=rm.get(t);n&&n.triggerSuggest()}}]),n}(Q.b);im.id="editor.action.triggerSuggest",Object(Q.m)(rm.ID,rm),Object(Q.k)(im);var om=190,am=Q.c.bindToContribution(rm.get);Object(Q.l)(new am({id:"acceptSelectedSuggestion",precondition:rp.Visible,handler:function(e){e.acceptSelectedSuggestion(!0,!1)}})),Ti.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:te.a.and(rp.Visible,X.a.textInputFocus),primary:2,weight:om}),Ti.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:te.a.and(rp.Visible,X.a.textInputFocus,rp.AcceptSuggestionsOnEnter,rp.MakesTextEdit),primary:3,weight:om}),Ie.d.appendMenuItem(ip,{command:{id:"acceptSelectedSuggestion",title:Z.a({key:"accept.accept",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")},group:"left",order:1,when:rp.HasInsertAndReplaceRange.toNegated()}),Ie.d.appendMenuItem(ip,{command:{id:"acceptSelectedSuggestion",title:Z.a({key:"accept.insert",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")},group:"left",order:1,when:te.a.and(rp.HasInsertAndReplaceRange,te.a.equals("config.editor.suggest.insertMode","insert"))}),Ie.d.appendMenuItem(ip,{command:{id:"acceptSelectedSuggestion",title:Z.a({key:"accept.replace",comment:['{0} will be a keybinding, e.g "Enter to replace"']},"{0} to replace")},group:"left",order:1,when:te.a.and(rp.HasInsertAndReplaceRange,te.a.equals("config.editor.suggest.insertMode","replace"))}),Object(Q.l)(new am({id:"acceptAlternativeSelectedSuggestion",precondition:te.a.and(rp.Visible,X.a.textInputFocus),kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:1027,secondary:[1026]},handler:function(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:ip,group:"left",order:2,when:te.a.and(rp.HasInsertAndReplaceRange,te.a.equals("config.editor.suggest.insertMode","insert")),title:Z.a({key:"accept.replace",comment:['{0} will be a keybinding, e.g "Enter to replace"']},"{0} to replace")},{menuId:ip,group:"left",order:2,when:te.a.and(rp.HasInsertAndReplaceRange,te.a.equals("config.editor.suggest.insertMode","replace")),title:Z.a({key:"accept.insert",comment:['{0} will be a keybinding, e.g "Enter to insert"']},"{0} to insert")}]})),dn.a.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object(Q.l)(new am({id:"hideSuggestWidget",precondition:rp.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:9,secondary:[1033]}})),Object(Q.l)(new am({id:"selectNextSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(Q.l)(new am({id:"selectNextPageSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:12,secondary:[2060]}})),Object(Q.l)(new am({id:"selectLastSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Object(Q.l)(new am({id:"selectPrevSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(Q.l)(new am({id:"selectPrevPageSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:11,secondary:[2059]}})),Object(Q.l)(new am({id:"selectFirstSuggestion",precondition:te.a.and(rp.Visible,rp.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Object(Q.l)(new am({id:"toggleSuggestionDetails",precondition:rp.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:ip,group:"right",order:1,when:te.a.and(rp.DetailsVisible,rp.CanResolve),title:Z.a("detail.more","show less")},{menuId:ip,group:"right",order:1,when:te.a.and(rp.DetailsVisible.toNegated(),rp.CanResolve),title:Z.a("detail.less","show more")}]})),Object(Q.l)(new am({id:"toggleExplainMode",precondition:rp.Visible,handler:function(e){return e.toggleExplainMode()},kbOpts:{weight:100,primary:2133}})),Object(Q.l)(new am({id:"toggleSuggestionFocus",precondition:rp.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:2570,mac:{primary:778}}})),Object(Q.l)(new am({id:"insertBestCompletion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),Qg.AtEnd,rp.Visible.toNegated(),zp.OtherSuggestions.toNegated(),Dp.InSnippetMode.toNegated()),handler:function(e,t){e.triggerSuggestAndAcceptBest(Object(Uo.i)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:om,primary:2}})),Object(Q.l)(new am({id:"insertNextSuggestion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),zp.OtherSuggestions,rp.Visible.toNegated(),Dp.InSnippetMode.toNegated()),handler:function(e){return e.acceptNextSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:2}})),Object(Q.l)(new am({id:"insertPrevSuggestion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),zp.OtherSuggestions,rp.Visible.toNegated(),Dp.InSnippetMode.toNegated()),handler:function(e){return e.acceptPrevSuggestion()},kbOpts:{weight:om,kbExpr:X.a.textInputFocus,primary:1026}}));var sm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.forceRetokenize",label:Z.a("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n=t.getModel();n.resetTokenization();var r=new Jg.a(!0);n.forceTokenization(n.getLineCount()),r.stop(),console.log("tokenization took ".concat(r.elapsed()))}}}]),n}(Q.b);Object(Q.k)(sm);var lm=n(189),cm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Z.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=!lm.b.getTabFocusMode();lm.b.setTabFocusMode(n),n?Object(he.a)(Z.a("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Object(he.a)(Z.a("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}]),n}(Q.b);cm.ID="editor.action.toggleTabFocusMode",Object(Q.k)(cm);var um=n(212),dm=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},hm=function(e,t){return function(n,r){t(n,r,e)}},fm=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},pm="ignoreUnusualLineTerminators";function gm(e,t,n){e.setModelProperty(t.uri,pm,n)}function mm(e,t){return e.getModelProperty(t.uri,pm)}var vm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._dialogService=r,o._codeEditorService=i,o._config=o._editor.getOption(103),o._register(o._editor.onDidChangeConfiguration((function(e){e.hasChanged(103)&&(o._config=o._editor.getOption(103),o._checkForUnusualLineTerminators())}))),o._register(o._editor.onDidChangeModel((function(){o._checkForUnusualLineTerminators()}))),o._register(o._editor.onDidChangeModelContent((function(e){e.isUndoing||o._checkForUnusualLineTerminators()}))),o}return Object($.a)(n,[{key:"_checkForUnusualLineTerminators",value:function(){return fm(this,void 0,void 0,G.a.mark((function e(){var t;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("off"!==this._config){e.next=2;break}return e.abrupt("return");case 2:if(this._editor.hasModel()){e.next=4;break}return e.abrupt("return");case 4:if((t=this._editor.getModel()).mightContainUnusualLineTerminators()){e.next=7;break}return e.abrupt("return");case 7:if(!0!==mm(this._codeEditorService,t)){e.next=10;break}return e.abrupt("return");case 10:if(!this._editor.getOption(72)){e.next=12;break}return e.abrupt("return");case 12:if("auto"!==this._config){e.next=15;break}return t.removeUnusualLineTerminators(this._editor.getSelections()),e.abrupt("return");case 15:return e.next=17,this._dialogService.confirm({title:Z.a("unusualLineTerminators.title","Unusual Line Terminators"),message:Z.a("unusualLineTerminators.message","Detected unusual line terminators"),detail:Z.a("unusualLineTerminators.detail","This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."),primaryButton:Z.a("unusualLineTerminators.fix","Fix this file"),secondaryButton:Z.a("unusualLineTerminators.ignore","Ignore problem for this file")});case 17:if(e.sent.confirmed){e.next=21;break}return gm(this._codeEditorService,t,!0),e.abrupt("return");case 21:t.removeUnusualLineTerminators(this._editor.getSelections());case 22:case"end":return e.stop()}}),e,this)})))}}]),n}(we.a);vm.ID="editor.contrib.unusualLineTerminatorsDetector",vm=dm([hm(1,um.a),hm(2,$e.a)],vm),Object(Q.m)(vm.ID,vm);var _m=n(237),bm=n(236),ym=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Sm=function(e,t){return function(n,r){t(n,r,e)}},Cm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._modelService=r,a._themeService=i,a._configurationService=o,a._editor=e,a._tokenizeViewport=new Ee.d((function(){return a._tokenizeViewportNow()}),100),a._outstandingRequests=[],a._register(a._editor.onDidScrollChange((function(){a._tokenizeViewport.schedule()}))),a._register(a._editor.onDidChangeModel((function(){a._cancelAll(),a._tokenizeViewport.schedule()}))),a._register(a._editor.onDidChangeModelContent((function(e){a._cancelAll(),a._tokenizeViewport.schedule()}))),a._register(vt.k.onDidChange((function(){a._cancelAll(),a._tokenizeViewport.schedule()}))),a._register(a._configurationService.onDidChangeConfiguration((function(e){e.affectsConfiguration(bm.b)&&(a._cancelAll(),a._tokenizeViewport.schedule())}))),a._register(a._themeService.onDidColorThemeChange((function(){a._cancelAll(),a._tokenizeViewport.schedule()}))),a}return Object($.a)(n,[{key:"_cancelAll",value:function(){var e,t=Object(Ce.a)(this._outstandingRequests);try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this._outstandingRequests=[]}},{key:"_removeOutstandingRequest",value:function(e){for(var t=0,n=this._outstandingRequests.length;t0?t[0]:null}}]),n}(we.a);Cm.ID="editor.contrib.viewportSemanticTokens",Cm=ym([Sm(1,_t.a),Sm(2,Ae.c),Sm(3,ir.a)],Cm),Object(Q.m)(Cm.ID,Cm);var km=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Em=function(e,t){return function(n,r){t(n,r,e)}},wm=Object(Le.gc)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},Z.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Om=Object(Le.gc)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},Z.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Tm=Object(Le.gc)("editor.wordHighlightBorder",{light:null,dark:null,hc:Le.b},Z.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),xm=Object(Le.gc)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Le.b},Z.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),Nm=Object(Le.gc)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},Z.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Dm=Object(Le.gc)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},Z.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Lm=new te.c("hasWordHighlights",!1);function Am(e,t,n){var r=vt.i.ordered(e);return Object(Ee.h)(r.map((function(r){return function(){return Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,ie.f)}})),ne.o)}var Im=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._wordRange=this._getCurrentWordRange(t,n),this.result=Object(Ee.f)((function(e){return i._compute(t,n,r,e)}))}return Object($.a)(e,[{key:"_getCurrentWordRange",value:function(e,t){var n=e.getWordAtPosition(t.getPosition());return n?new Te.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}},{key:"isValid",value:function(e,t,n){for(var r=t.startLineNumber,i=t.startColumn,o=t.endColumn,a=this._getCurrentWordRange(e,t),s=Boolean(this._wordRange&&this._wordRange.equalsRange(a)),l=0,c=n.length;!s&&l=o&&(s=!0)}return s}},{key:"cancel",value:function(){this.result.cancel()}}]),e}(),Rm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_compute",value:function(e,t,n,r){return Am(e,t.getPosition(),r).then((function(e){return e||[]}))}}]),n}(Im),Mm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this,e,r,i))._selectionIsEmpty=r.isEmpty(),o}return Object($.a)(n,[{key:"_compute",value:function(e,t,n,r){return Object(Ee.l)(250,r).then((function(){if(!t.isEmpty())return[];var r=e.getWordAtPosition(t.getPosition());return!r||r.word.length>1e3?[]:e.findMatches(r.word,!0,!1,!0,n,!1).map((function(e){return{range:e.range,kind:vt.h.Text}}))}))}},{key:"isValid",value:function(e,t,r){var i=t.isEmpty();return this._selectionIsEmpty===i&&Object(Rt.a)(Object(Mt.a)(n.prototype),"isValid",this).call(this,e,t,r)}}]),n}(Im);Object(Q.p)("_executeDocumentHighlights",(function(e,t){return Am(e,t,pt.a.None)}));var Pm=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this.toUnhook=new we.b,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=t,this._hasWordHighlights=Lm.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(63),this.model=this.editor.getModel(),this.toUnhook.add(t.onDidChangeCursorPosition((function(e){r._ignorePositionChangeEvent||r.occurrencesHighlight&&r._onPositionChanged(e)}))),this.toUnhook.add(t.onDidChangeModelContent((function(e){r._stopAll()}))),this.toUnhook.add(t.onDidChangeConfiguration((function(e){var t=r.editor.getOption(63);r.occurrencesHighlight!==t&&(r.occurrencesHighlight=t,r._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return Object($.a)(e,[{key:"hasDecorations",value:function(){return this._decorationIds.length>0}},{key:"restore",value:function(){this.occurrencesHighlight&&this._run()}},{key:"_getSortedHighlights",value:function(){var e=this;return ne.d(this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(Te.a.compareRangesUsingStarts))}},{key:"moveNext",value:function(){var e=this,t=this._getSortedHighlights(),n=(ne.j(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length,r=t[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);var i=this._getWord();if(i){var o=this.editor.getModel().getLineContent(r.startLineNumber);Object(he.a)("".concat(o,", ").concat(n+1," of ").concat(t.length," for '").concat(i.word,"'"))}}finally{this._ignorePositionChangeEvent=!1}}},{key:"moveBack",value:function(){var e=this,t=this._getSortedHighlights(),n=(ne.j(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length,r=t[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);var i=this._getWord();if(i){var o=this.editor.getModel().getLineContent(r.startLineNumber);Object(he.a)("".concat(o,", ").concat(n+1," of ").concat(t.length," for '").concat(i.word,"'"))}}finally{this._ignorePositionChangeEvent=!1}}},{key:"_removeDecorations",value:function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}},{key:"_stopAll",value:function(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}},{key:"_onPositionChanged",value:function(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}},{key:"_getWord",value:function(){var e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}},{key:"_run",value:function(){var e=this,t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var n=t.startColumn,r=t.endColumn,i=this._getWord();if(!i||i.startColumn>n||i.endColumn=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),n-t)}},{key:"renderDecorations",value:function(){this.renderDecorationsTimer=-1;var t,n=[],r=Object(Ce.a)(this.workerRequestValue);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.range&&n.push({range:i.range,options:e._getDecorationOptions(i.kind)})}}catch(o){r.e(o)}finally{r.f()}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,n),this._hasWordHighlights.set(this.hasDecorations())}},{key:"dispose",value:function(){this._stopAll(),this.toUnhook.dispose()}}],[{key:"_getDecorationOptions",value:function(e){return e===vt.h.Write?this._WRITE_OPTIONS:e===vt.h.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}}]),e}();Pm._WRITE_OPTIONS=Ne.a.register({stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Object(Ae.h)(Dm),position:xe.d.Center}}),Pm._TEXT_OPTIONS=Ne.a.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:Object(Ae.h)(Le.Wb),position:xe.d.Center}}),Pm._REGULAR_OPTIONS=Ne.a.register({stickiness:1,className:"wordHighlight",overviewRuler:{color:Object(Ae.h)(Nm),position:xe.d.Center}});var jm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this)).wordHighlighter=null;var o=function(){e.hasModel()&&(i.wordHighlighter=new Pm(e,r))};return i._register(e.onDidChangeModel((function(e){i.wordHighlighter&&(i.wordHighlighter.dispose(),i.wordHighlighter=null),o()}))),o(),i}return Object($.a)(n,[{key:"saveViewState",value:function(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}},{key:"moveNext",value:function(){this.wordHighlighter&&this.wordHighlighter.moveNext()}},{key:"moveBack",value:function(){this.wordHighlighter&&this.wordHighlighter.moveBack()}},{key:"restoreViewState",value:function(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}},{key:"dispose",value:function(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);jm.ID="editor.contrib.wordHighlighter",jm=km([Em(1,te.b)],jm);var Fm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._isNext=e,i}return Object($.a)(n,[{key:"run",value:function(e,t){var n=jm.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}]),n}(Q.b),Bm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,{id:"editor.action.wordHighlight.next",label:Z.a("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Lm,kbOpts:{kbExpr:X.a.editorTextFocus,primary:65,weight:100}})}return n}(Fm),Um=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,{id:"editor.action.wordHighlight.prev",label:Z.a("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Lm,kbOpts:{kbExpr:X.a.editorTextFocus,primary:1089,weight:100}})}return n}(Fm),Hm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.wordHighlight.trigger",label:Z.a("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Lm.toNegated(),kbOpts:{kbExpr:X.a.editorTextFocus,primary:0,weight:100}})}return Object($.a)(n,[{key:"run",value:function(e,t,n){var r=jm.get(t);r&&r.restoreViewState(!0)}}]),n}(Q.b);Object(Q.m)(jm.ID,jm),Object(Q.k)(Bm),Object(Q.k)(Um),Object(Q.k)(Hm),Object(Ae.g)((function(e,t){var n=e.getColor(Le.Q);n&&(t.addRule(".monaco-editor .focused .selectionHighlight { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .selectionHighlight { background-color: ".concat(n.transparent(.5),"; }")));var r=e.getColor(wm);r&&t.addRule(".monaco-editor .wordHighlight { background-color: ".concat(r,"; }"));var i=e.getColor(Om);i&&t.addRule(".monaco-editor .wordHighlightStrong { background-color: ".concat(i,"; }"));var o=e.getColor(Le.R);o&&t.addRule(".monaco-editor .selectionHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(o,"; box-sizing: border-box; }"));var a=e.getColor(Tm);a&&t.addRule(".monaco-editor .wordHighlight { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(a,"; box-sizing: border-box; }"));var s=e.getColor(xm);s&&t.addRule(".monaco-editor .wordHighlightStrong { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(s,"; box-sizing: border-box; }"))}));var zm=n(35),Vm=n(142),Wm=n(123),Gm=n(43),qm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this,e))._inSelectionMode=e.inSelectionMode,r._wordNavigationType=e.wordNavigationType,r}return Object($.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this;if(t.hasModel()){var i=Object(Wm.a)(t.getOption(105)),o=t.getModel(),a=t.getSelections().map((function(e){var t=new Oe.a(e.positionLineNumber,e.positionColumn),n=r._move(i,o,t,r._wordNavigationType);return r._moveTo(e,n,r._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",0,a.map((function(e){return zm.d.fromModelSelection(e)}))),1===a.length){var s=new Oe.a(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(s,0)}}}},{key:"_moveTo",value:function(e,t,n){return n?new J.a(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new J.a(t.lineNumber,t.column,t.lineNumber,t.column)}}]),n}(Q.c),Km=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_move",value:function(e,t,n,r){return Vm.a.moveWordLeft(e,t,n,r)}}]),n}(qm),Ym=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_move",value:function(e,t,n,r){return Vm.a.moveWordRight(e,t,n,r)}}]),n}(qm),$m=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}return n}(Km),Qm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}return n}(Km),Zm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2063,mac:{primary:527},weight:100}})}return n}(Km),Xm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}return n}(Km),Jm=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}return n}(Km),ev=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})}return n}(Km),tv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,_s.a),win:{primary:2063},weight:101}})}return Object($.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(Rt.a)(Object(Mt.a)(n.prototype),"_move",this).call(this,Object(Wm.a)(Gm.g.wordSeparators.defaultValue),t,r,i)}}]),n}(Km),nv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,_s.a),win:{primary:3087},weight:101}})}return Object($.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(Rt.a)(Object(Mt.a)(n.prototype),"_move",this).call(this,Object(Wm.a)(Gm.g.wordSeparators.defaultValue),t,r,i)}}]),n}(Km),rv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}return n}(Ym),iv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2065,mac:{primary:529},weight:100}})}return n}(Ym),ov=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}return n}(Ym),av=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}return n}(Ym),sv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})}return n}(Ym),lv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}return n}(Ym),cv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,_s.a),win:{primary:2065},weight:101}})}return Object($.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(Rt.a)(Object(Mt.a)(n.prototype),"_move",this).call(this,Object(Wm.a)(Gm.g.wordSeparators.defaultValue),t,r,i)}}]),n}(Ym),uv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,_s.a),win:{primary:3089},weight:101}})}return Object($.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(Rt.a)(Object(Mt.a)(n.prototype),"_move",this).call(this,Object(Wm.a)(Gm.g.wordSeparators.defaultValue),t,r,i)}}]),n}(Ym),dv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this,e))._whitespaceHeuristics=e.whitespaceHeuristics,r._wordNavigationType=e.wordNavigationType,r}return Object($.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this;if(t.hasModel()){var i=Object(Wm.a)(t.getOption(105)),o=t.getModel(),a=t.getSelections().map((function(e){var t=r._delete(i,o,e,r._whitespaceHeuristics,r._wordNavigationType);return new Ve.a(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}}]),n}(Q.c),hv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_delete",value:function(e,t,n,r,i){var o=Vm.a.deleteWordLeft(e,t,n,r,i);return o||new Te.a(1,1,1,1)}}]),n}(dv),fv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_delete",value:function(e,t,n,r,i){var o=Vm.a.deleteWordRight(e,t,n,r,i);if(o)return o;var a=t.getLineCount(),s=t.getLineMaxColumn(a);return new Te.a(a,s,a,s)}}]),n}(dv),pv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:X.a.writable})}return n}(hv),gv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:X.a.writable})}return n}(hv),mv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}return n}(hv),vv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:X.a.writable})}return n}(fv),_v=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:X.a.writable})}return n}(fv),bv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}return n}(fv);Object(Q.l)(new $m),Object(Q.l)(new Qm),Object(Q.l)(new Zm),Object(Q.l)(new Xm),Object(Q.l)(new Jm),Object(Q.l)(new ev),Object(Q.l)(new rv),Object(Q.l)(new iv),Object(Q.l)(new ov),Object(Q.l)(new av),Object(Q.l)(new sv),Object(Q.l)(new lv),Object(Q.l)(new tv),Object(Q.l)(new nv),Object(Q.l)(new cv),Object(Q.l)(new uv),Object(Q.l)(new pv),Object(Q.l)(new gv),Object(Q.l)(new mv),Object(Q.l)(new vv),Object(Q.l)(new _v),Object(Q.l)(new bv);var yv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:769},weight:100}})}return Object($.a)(n,[{key:"_delete",value:function(e,t,n,r,i){var o=Vm.b.deleteWordPartLeft(e,t,n,r);return o||new Te.a(1,1,1,1)}}]),n}(dv),Sv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:788},weight:100}})}return Object($.a)(n,[{key:"_delete",value:function(e,t,n,r,i){var o=Vm.b.deleteWordPartRight(e,t,n,r);if(o)return o;var a=t.getLineCount(),s=t.getLineMaxColumn(a);return new Te.a(a,s,a,s)}}]),n}(dv),Cv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_move",value:function(e,t,n,r){return Vm.b.moveWordPartLeft(e,t,n)}}]),n}(qm),kv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:783},weight:100}})}return n}(Cv);dn.a.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var Ev=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}return n}(Cv);dn.a.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var wv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object($.a)(n,[{key:"_move",value:function(e,t,n,r){return Vm.b.moveWordPartRight(e,t,n)}}]),n}(qm),Ov=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:785},weight:100}})}return n}(wv),Tv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}return n}(wv);Object(Q.l)(new yv),Object(Q.l)(new Sv),Object(Q.l)(new kv),Object(Q.l)(new Ev),Object(Q.l)(new Ov),Object(Q.l)(new Tv);var xv=n(63),Nv=(n(511),n(47)),Dv=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Lv=function(e,t){return function(n,r){t(n,r,e)}},Av=new te.c("accessibilityHelpWidgetVisible",!1),Iv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._editor=e,i._widget=i._register(r.createInstance(Rv,i._editor)),i}return Object($.a)(n,[{key:"show",value:function(){this._widget.show()}},{key:"hide",value:function(){this._widget.hide()}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);Iv.ID="editor.contrib.accessibilityHelpController",Iv=Dv([Lv(1,Ht.a)],Iv);var Rv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o){var a;return Object(Y.a)(this,n),(a=t.call(this))._contextKeyService=r,a._keybindingService=i,a._openerService=o,a._editor=e,a._isVisibleKey=Av.bindTo(a._contextKeyService),a._domNode=Object(Nv.b)(document.createElement("div")),a._domNode.setClassName("accessibilityHelpWidget"),a._domNode.setDisplay("none"),a._domNode.setAttribute("role","dialog"),a._domNode.setAttribute("aria-hidden","true"),a._contentDomNode=Object(Nv.b)(document.createElement("div")),a._contentDomNode.setAttribute("role","document"),a._domNode.appendChild(a._contentDomNode),a._isVisible=!1,a._register(a._editor.onDidLayoutChange((function(){a._isVisible&&a._layout()}))),a._register(zt.addStandardDisposableListener(a._contentDomNode.domNode,"keydown",(function(e){if(a._isVisible&&(e.equals(2083)&&(Object(he.a)(xv.a.emergencyConfOn),a._editor.updateOptions({accessibilitySupport:"on"}),zt.clearNode(a._contentDomNode.domNode),a._buildContent(),a._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(he.a)(xv.a.openingDocs);var t=a._editor.getRawOptions().accessibilityHelpUrl;"undefined"===typeof t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),a._openerService.open(gt.a.parse(t)),e.preventDefault(),e.stopPropagation()}}))),a.onblur(a._contentDomNode.domNode,(function(){a.hide()})),a._editor.addOverlayWidget(Object(ut.a)(a)),a}return Object($.a)(n,[{key:"dispose",value:function(){this._editor.removeOverlayWidget(this),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n.ID}},{key:"getDomNode",value:function(){return this._domNode.domNode}},{key:"getPosition",value:function(){return{preference:null}}},{key:"show",value:function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}},{key:"_descriptionForCommand",value:function(e,t,n){var r=this._keybindingService.lookupKeybinding(e);return r?ht.x(t,r.getAriaLabel()):ht.x(n,e)}},{key:"_buildContent",value:function(){var e=this._editor.getOptions(),t=this._editor.getSelections(),n=0;if(t){var r=this._editor.getModel();r&&t.forEach((function(e){n+=r.getValueLengthInRange(e)}))}var i=function(e,t){return e&&0!==e.length?1===e.length?t?ht.x(xv.a.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):ht.x(xv.a.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?ht.x(xv.a.multiSelectionRange,e.length,t):e.length>0?ht.x(xv.a.multiSelection,e.length):"":xv.a.noSelection}(t,n);e.get(47)?e.get(72)?i+=xv.a.readonlyDiffEditor:i+=xv.a.editableDiffEditor:e.get(72)?i+=xv.a.readonlyEditor:i+=xv.a.editableEditor;var o=Ke.f?xv.a.changeConfigToOnMac:xv.a.changeConfigToOnWinLinux;switch(e.get(2)){case 0:i+="\n\n - "+o;break;case 2:i+="\n\n - "+xv.a.auto_on;break;case 1:i+="\n\n - "+xv.a.auto_off,i+=" "+o}e.get(116)?i+="\n\n - "+this._descriptionForCommand(cm.ID,xv.a.tabFocusModeOnMsg,xv.a.tabFocusModeOnMsgNoKb):i+="\n\n - "+this._descriptionForCommand(cm.ID,xv.a.tabFocusModeOffMsg,xv.a.tabFocusModeOffMsgNoKb),i+="\n\n - "+(Ke.f?xv.a.openDocMac:xv.a.openDocWinLinux),i+="\n\n"+xv.a.outroMsg,this._contentDomNode.domNode.appendChild(Object(Uu.b)(i)),this._contentDomNode.domNode.setAttribute("aria-label",i)}},{key:"hide",value:function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,zt.clearNode(this._contentDomNode.domNode),this._editor.focus())}},{key:"_layout",value:function(){var e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(n.WIDTH,e.width-40)),r=Math.max(5,Math.min(n.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(r);var i=Math.round((e.height-r)/2);this._domNode.setTop(i);var o=Math.round((e.width-t)/2);this._domNode.setLeft(o)}}]),n}(di.a);Rv.ID="editor.contrib.accessibilityHelpWidget",Rv.WIDTH=500,Rv.HEIGHT=300,Rv=Dv([Lv(1,te.b),Lv(2,Gt.a),Lv(3,$c.a)],Rv);var Mv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.showAccessibilityHelp",label:xv.a.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=Iv.get(t);n&&n.show()}}]),n}(Q.b);Object(Q.m)(Iv.ID,Iv),Object(Q.k)(Mv);var Pv=Q.c.bindToContribution(Iv.get);Object(Q.l)(new Pv({id:"closeAccessibilityHelp",precondition:Av,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object(Ae.g)((function(e,t){var n=e.getColor(Le.U);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: ".concat(n,"; }"));var r=e.getColor(Le.W);r&&t.addRule(".monaco-editor .accessibilityHelpWidget { color: ".concat(r,"; }"));var i=e.getColor(Le.uc);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ".concat(i,"; }"));var o=e.getColor(Le.h);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid ".concat(o,"; }"))}));n(512);var jv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editor=e,r.widget=null,qe.i&&(r._register(e.onDidChangeConfiguration((function(){return r.update()}))),r.update()),r}return Object($.a)(n,[{key:"update",value:function(){var e=!this.editor.getOption(72);!this.widget&&e?this.widget=new Fv(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}},{key:"dispose",value:function(){Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this),this.widget&&(this.widget.dispose(),this.widget=null)}}]),n}(we.a);jv.ID="editor.contrib.iPadShowKeyboard";var Fv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editor=e,r._domNode=document.createElement("textarea"),r._domNode.className="iPadShowKeyboard",r._register(zt.addDisposableListener(r._domNode,"touchstart",(function(e){r.editor.focus()}))),r._register(zt.addDisposableListener(r._domNode,"focus",(function(e){r.editor.focus()}))),r.editor.addOverlayWidget(Object(ut.a)(r)),r}return Object($.a)(n,[{key:"dispose",value:function(){this.editor.removeOverlayWidget(this),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n.ID}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return{preference:1}}}]),n}(we.a);Fv.ID="editor.contrib.ShowKeyboardWidget",Object(Q.m)(jv.ID,jv);n(513);var Bv=n(94),Uv=n(153),Hv=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},zv=function(e,t){return function(n,r){t(n,r,e)}},Vv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._modeService=i,o._widget=null,o._register(o._editor.onDidChangeModel((function(e){return o.stop()}))),o._register(o._editor.onDidChangeModelLanguage((function(e){return o.stop()}))),o._register(vt.C.onDidChange((function(e){return o.stop()}))),o._register(o._editor.onKeyUp((function(e){return 9===e.keyCode&&o.stop()}))),o}return Object($.a)(n,[{key:"dispose",value:function(){this.stop(),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"launch",value:function(){this._widget||this._editor.hasModel()&&(this._widget=new Gv(this._editor,this._modeService))}},{key:"stop",value:function(){this._widget&&(this._widget.dispose(),this._widget=null)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(we.a);Vv.ID="editor.contrib.inspectTokens",Vv=Hv([zv(1,Uv.a),zv(2,Pc.a)],Vv);var Wv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inspectTokens",label:xv.c.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}return Object($.a)(n,[{key:"run",value:function(e,t){var n=Vv.get(t);n&&n.launch()}}]),n}(Q.b);var Gv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i,o;return Object(Y.a)(this,n),(i=t.call(this)).allowEditorOverflow=!0,i._editor=e,i._modeService=r,i._model=i._editor.getModel(),i._domNode=document.createElement("div"),i._domNode.className="tokens-inspect-widget",i._tokenizationSupport=(o=i._model.getLanguageIdentifier(),vt.C.get(o.language)||{getInitialState:function(){return Bv.c},tokenize:function(e,t,n){return Object(Bv.d)(o.language,e,t,n)},tokenize2:function(e,t,n){return Object(Bv.e)(o.id,e,t,n)}}),i._compute(i._editor.getPosition()),i._register(i._editor.onDidChangeCursorPosition((function(e){return i._compute(i._editor.getPosition())}))),i._editor.addContentWidget(Object(ut.a)(i)),i}return Object($.a)(n,[{key:"dispose",value:function(){this._editor.removeContentWidget(this),Object(Rt.a)(Object(Mt.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n._ID}},{key:"_compute",value:function(e){for(var t=this._getTokensAtLine(e.lineNumber),n=0,r=t.tokens1.length-1;r>=0;r--){var i=t.tokens1[r];if(e.column-1>=i.offset){n=r;break}}for(var o=0,a=t.tokens2.length>>>1;a>=0;a--)if(e.column-1>=t.tokens2[a<<1]){o=a;break}var s=this._model.getLineContent(e.lineNumber),l="";if(n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Yv=function(e,t){return function(n,r){t(n,r,e)}},$v=function(){function e(t){Object(Y.a)(this,e),this.quickInputService=t,this.registry=yf.a.as(qv.b.Quickaccess)}return Object($.a)(e,[{key:"provide",value:function(t){var n=this,r=new we.b;r.add(t.onDidAccept((function(){var e=Object(ke.a)(t.selectedItems,1)[0];e&&n.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),r.add(t.onDidChangeValue((function(t){var r=n.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));r&&r.prefix&&r.prefix!==e.PREFIX&&n.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})));var i=this.getQuickAccessProviders(),o=i.editorProviders,a=i.globalProviders;return t.items=0===o.length||0===a.length?Object(ct.a)(0===o.length?a:o):[{label:Object(Z.a)("globalCommands","global commands"),type:"separator"}].concat(Object(ct.a)(a),[{label:Object(Z.a)("editorCommands","editor commands"),type:"separator"}],Object(ct.a)(o)),r}},{key:"getQuickAccessProviders",value:function(){var t,n=[],r=[],i=Object(Ce.a)(this.registry.getQuickAccessProviders().sort((function(e,t){return e.prefix.localeCompare(t.prefix)})));try{for(i.s();!(t=i.n()).done;){var o=t.value;if(o.prefix!==e.PREFIX){var a,s=Object(Ce.a)(o.helpEntries);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=l.prefix||o.prefix,u=c||"\u2026";(l.needsEditor?r:n).push({prefix:c,label:u,ariaLabel:Object(Z.a)("helpPickAriaLabel","{0}, {1}",u,l.description),description:l.description})}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){i.e(d)}finally{i.f()}return{editorProviders:r,globalProviders:n}}}]),e}();$v.PREFIX="?",$v=Kv([Yv(0,Zn.a)],$v),yf.a.as(qv.b.Quickaccess).registerQuickAccessProvider({ctor:$v,prefix:"",helpEntries:[{description:xv.e.helpQuickAccessActionLabel,needsEditor:!0}]});var Qv=function(){function e(t){Object(Y.a)(this,e),this.options=t,this.rangeHighlightDecorationId=void 0}return Object($.a)(e,[{key:"provide",value:function(e,t){var n,r=this,i=new we.b;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;var o=i.add(new we.d);return o.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange((function(){o.value=void 0,o.value=r.doProvide(e,t)}))),i}},{key:"doProvide",value:function(e,t){var n=this,r=new we.b,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){var o=Object(ja.a)(i);if(o){var a=Object(Uo.n)(i.saveViewState());r.add(o.onDidChangeCursorPosition((function(){a=Object(Uo.n)(i.saveViewState())}))),r.add(Object(Wn.a)(t.onCancellationRequested)((function(){a&&i===n.activeTextEditorControl&&i.restoreViewState(a)})))}r.add(Object(we.h)((function(){return n.clearDecorations(i)}))),r.add(this.provideWithTextEditor(i,e,t))}else r.add(this.provideWithoutTextEditor(e,t));return r}},{key:"canProvideWithTextEditor",value:function(e){return!0}},{key:"gotoLocation",value:function(e,t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}},{key:"getModel",value:function(e){var t;return Object(ja.c)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}},{key:"addDecorations",value:function(e,t){var n=this;e.changeDecorations((function(e){var r=[];n.rangeHighlightDecorationId&&(r.push(n.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(n.rangeHighlightDecorationId.rangeHighlightId),n.rangeHighlightDecorationId=void 0);var i=[{range:t,options:{className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{overviewRuler:{color:Object(Ae.h)(De.s),position:xe.d.Full}}}],o=e.deltaDecorations(r,i),a=Object(ke.a)(o,2),s=a[0],l=a[1];n.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:l}}))}},{key:"clearDecorations",value:function(e){var t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((function(e){e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}]),e}(),Zv=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{canAcceptInBackground:!0})}return Object($.a)(n,[{key:"provideWithoutTextEditor",value:function(e){var t=Object(Z.a)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,we.a.None}},{key:"provideWithTextEditor",value:function(e,t,r){var i=this,o=new we.b;o.add(t.onDidAccept((function(n){var r=Object(ke.a)(t.selectedItems,1)[0];if(r){if(!i.isValidLineNumber(e,r.lineNumber))return;i.gotoLocation(e,{range:i.toRange(r.lineNumber,r.column),keyMods:t.keyMods,preserveFocus:n.inBackground}),n.inBackground||t.hide()}})));var a=function(){var r=i.parsePosition(e,t.value.trim().substr(n.PREFIX.length)),o=i.getPickLabel(e,r.lineNumber,r.column);if(t.items=[{lineNumber:r.lineNumber,column:r.column,label:o}],t.ariaLabel=o,i.isValidLineNumber(e,r.lineNumber)){var a=i.toRange(r.lineNumber,r.column);e.revealRangeInCenter(a,0),i.addDecorations(e,a)}else i.clearDecorations(e)};a(),o.add(t.onDidChangeValue((function(){return a()})));var s=Object(ja.a)(e);s&&(2===s.getOptions().get(52).renderType&&(s.updateOptions({lineNumbers:"on"}),o.add(Object(we.h)((function(){return s.updateOptions({lineNumbers:"relative"})})))));return o}},{key:"toRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}},{key:"parsePosition",value:function(e,t){var n=t.split(/,|:|#/).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)})),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}},{key:"getPickLabel",value:function(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?Object(Z.a)("gotoLineColumnLabel","Go to line {0} and column {1}.",t,n):Object(Z.a)("gotoLineLabel","Go to line {0}.",t);var r=e.getPosition()||{lineNumber:1,column:1},i=this.lineCount(e);return i>1?Object(Z.a)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,i):Object(Z.a)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}},{key:"isValidLineNumber",value:function(e,t){return!(!t||"number"!==typeof t)&&(t>0&&t<=this.lineCount(e))}},{key:"isValidColumn",value:function(e,t,n){if(!n||"number"!==typeof n)return!1;var r=this.getModel(e);if(!r)return!1;var i={lineNumber:t,column:n};return r.validatePosition(i).equals(i)}},{key:"lineCount",value:function(e){var t,n;return null!==(n=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==n?n:0}}]),n}(Qv);Zv.PREFIX=":";var Xv=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},Jv=function(e,t){return function(n,r){t(n,r,e)}},e_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editorService=e,r.onDidActiveTextEditorControlChange=en.b.None,r}return Object($.a)(n,[{key:"activeTextEditorControl",get:function(){return Object(Uo.n)(this.editorService.getFocusedCodeEditor())}}]),n}(Zv);e_=Xv([Jv(0,$e.a)],e_),yf.a.as(qv.b.Quickaccess).registerQuickAccessProvider({ctor:e_,prefix:e_.PREFIX,helpEntries:[{description:xv.b.gotoLineActionLabel,needsEditor:!0}]});var t_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.gotoLine",label:xv.b.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:2085,mac:{primary:293},weight:100}})}return Object($.a)(n,[{key:"run",value:function(e){e.get(Zn.a).quickAccess.show(e_.PREFIX)}}]),n}(Q.b);Object(Q.k)(t_);var n_=[void 0,[]];function r_(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t;return i.values&&i.values.length>1?i_(e,i.values,n,r):o_(e,t,n,r)}function i_(e,t,n,r){var i,o=0,a=[],s=Object(Ce.a)(t);try{for(s.s();!(i=s.n()).done;){var l=o_(e,i.value,n,r),c=Object(ke.a)(l,2),u=c[0],d=c[1];if("number"!==typeof u)return n_;o+=u,a.push.apply(a,Object(ct.a)(d))}}catch(h){s.e(h)}finally{s.f()}return[o,a_(a)]}function o_(e,t,n,r){var i=Object(wl.d)(t.original,t.originalLowercase,n,e,e.toLowerCase(),r,!0);return i?[i[0],Object(wl.c)(i)]:n_}function a_(e){var t,n=e.sort((function(e,t){return e.start-t.start})),r=[],i=void 0,o=Object(Ce.a)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;i&&s_(i,a)?(i.start=Math.min(i.start,a.start),i.end=Math.max(i.end,a.end)):(i=a,r.push(a))}}catch(s){o.e(s)}finally{o.f()}return r}function s_(e,t){return!(e.end=0,s=void 0,l=e.split(" ");if(l.length>1){var c,u=Object(Ce.a)(l);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=u_(d),f=h.pathNormalized,p=h.normalized,g=h.normalizedLowercase;p&&(s||(s=[]),s.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:f,normalized:p,normalizedLowercase:g}))}}catch(m){u.e(m)}finally{u.f()}}return{original:e,originalLowercase:t,pathNormalized:r,normalized:i,normalizedLowercase:o,values:s,containsPathSeparator:a}}function u_(e){var t;t=Ke.i?e.replace(/\//g,bl.h):e.replace(/\\/g,bl.h);var n=Object(ht.V)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:n,normalizedLowercase:n.toLowerCase()}}function d_(e){return Array.isArray(e)?c_(e.map((function(e){return e.original})).join(" ")):c_(e.original)}var h_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},f_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.create(null);return Object(Y.a)(this,n),(e=t.call(this,r)).options=r,r.canAcceptInBackground=!0,e}return Object($.a)(n,[{key:"provideWithoutTextEditor",value:function(e){return this.provideLabelPick(e,Object(Z.a)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),we.a.None}},{key:"provideWithTextEditor",value:function(e,t,n){var r=this.getModel(e);return r?vt.m.has(r)?this.doProvideWithEditorSymbols(e,r,t,n):this.doProvideWithoutEditorSymbols(e,r,t,n):we.a.None}},{key:"doProvideWithoutEditorSymbols",value:function(e,t,n,r){var i=this,o=new we.b;return this.provideLabelPick(n,Object(Z.a)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),h_(i,void 0,void 0,G.a.mark((function i(){return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.waitForLanguageSymbolRegistry(t,o);case 2:if(i.sent&&!r.isCancellationRequested){i.next=5;break}return i.abrupt("return");case 5:o.add(this.doProvideWithEditorSymbols(e,t,n,r));case 6:case"end":return i.stop()}}),i,this)}))),o}},{key:"provideLabelPick",value:function(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}},{key:"waitForLanguageSymbolRegistry",value:function(e,t){return h_(this,void 0,void 0,G.a.mark((function n(){var r,i,o;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!vt.m.has(e)){n.next=2;break}return n.abrupt("return",!0);case 2:return i=new Promise((function(e){return r=e})),o=t.add(vt.m.onDidChange((function(){vt.m.has(e)&&(o.dispose(),r(!0))}))),t.add(Object(we.h)((function(){return r(!1)}))),n.abrupt("return",i);case 6:case"end":return n.stop()}}),n)})))}},{key:"doProvideWithEditorSymbols",value:function(e,t,r,i){var o=this,a=new we.b;a.add(r.onDidAccept((function(t){var n=Object(ke.a)(r.selectedItems,1)[0];n&&n.range&&(o.gotoLocation(e,{range:n.range.selection,keyMods:r.keyMods,preserveFocus:t.inBackground}),t.inBackground||r.hide())}))),a.add(r.onDidTriggerItemButton((function(t){var n=t.item;n&&n.range&&(o.gotoLocation(e,{range:n.range.selection,keyMods:r.keyMods,forceSideBySide:!0}),r.hide())})));var s=this.getDocumentSymbols(t,!0,i),l=void 0,c=function(){return h_(o,void 0,void 0,G.a.mark((function e(){var t,o;return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===l||void 0===l||l.dispose(!0),r.busy=!1,l=new pt.b(i),r.busy=!0,e.prev=4,t=c_(r.value.substr(n.PREFIX.length).trim()),e.next=8,this.doGetSymbolPicks(s,t,void 0,l.token);case 8:if(o=e.sent,!i.isCancellationRequested){e.next=11;break}return e.abrupt("return");case 11:o.length>0?r.items=o:t.original.length>0?this.provideLabelPick(r,Object(Z.a)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(r,Object(Z.a)("noSymbolResults","No editor symbols"));case 12:return e.prev=12,i.isCancellationRequested||(r.busy=!1),e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[4,,12,15]])})))};a.add(r.onDidChangeValue((function(){return c()}))),c();var u=!0;return a.add(r.onDidChangeActive((function(){var t=Object(ke.a)(r.activeItems,1)[0];if(t&&t.range){if(u)return void(u=!1);e.revealRangeInCenter(t.range.selection,0),o.addDecorations(e,t.range.decoration)}}))),a}},{key:"doGetSymbolPicks",value:function(e,t,r,i){return h_(this,void 0,void 0,G.a.mark((function o(){var a,s,l,c,u,d,h,f,p,g,m,v,_,b,y,S,C,k,E,w,O,T,x,N,D,L,A,I,R,M,P,j,F,B=this;return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,e;case 2:if(a=o.sent,!i.isCancellationRequested){o.next=5;break}return o.abrupt("return",[]);case 5:s=0===t.original.indexOf(n.SCOPE_PREFIX),l=s?1:0,t.values&&t.values.length>1?(c=d_(t.values[0]),u=d_(t.values.slice(1))):c=t,d=[],h=0;case 10:if(!(hl)){o.next=36;break}if(C=!1,c!==t&&(k=r_(g,Object.assign(Object.assign({},t),{values:void 0}),l,m),E=Object(ke.a)(k,2),_=E[0],b=E[1],"number"===typeof _&&(C=!0)),"number"===typeof _){o.next=31;break}if(w=r_(g,c,l,m),O=Object(ke.a)(w,2),_=O[0],b=O[1],"number"===typeof _){o.next=31;break}return o.abrupt("continue",38);case 31:if(C||!u){o.next=36;break}if(v&&u.original.length>0&&(T=r_(v,u),x=Object(ke.a)(T,2),y=x[0],S=x[1]),"number"===typeof y){o.next=35;break}return o.abrupt("continue",38);case 35:"number"===typeof _&&(_+=y);case 36:N=f.tags&&f.tags.indexOf(1)>=0,d.push({index:h,kind:f.kind,score:_,label:g,ariaLabel:p,description:v,highlights:N?void 0:{label:b,description:S},range:{selection:Te.a.collapseToStart(f.selectionRange),decoration:f.range},strikethrough:N,buttons:function(){var e,t,n=(null===(e=B.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=B.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(n)return[{iconClass:"right"===n?re.a.splitHorizontal.classNames:re.a.splitVertical.classNames,tooltip:"right"===n?Object(Z.a)("openToSide","Open to the Side"):Object(Z.a)("openToBottom","Open to the Bottom")}]}()});case 38:h++,o.next=10;break;case 41:if(D=d.sort((function(e,t){return s?B.compareByKindAndScore(e,t):B.compareByScore(e,t)})),L=[],s){M=function(){I&&"number"===typeof A&&R>0&&(I.label=Object(ht.x)(g_[A]||p_,R))},A=void 0,I=void 0,R=0,P=Object(Ce.a)(D);try{for(P.s();!(j=P.n()).done;)F=j.value,A!==F.kind?(M(),A=F.kind,R=1,I={type:"separator"},L.push(I)):R++,L.push(F)}catch(U){P.e(U)}finally{P.f()}M()}else D.length>0&&(L=[{label:Object(Z.a)("symbols","symbols ({0})",d.length),type:"separator"}].concat(Object(ct.a)(D)));return o.abrupt("return",L);case 45:case"end":return o.stop()}}),o)})))}},{key:"compareByScore",value:function(e,t){if("number"!==typeof e.score&&"number"===typeof t.score)return 1;if("number"===typeof e.score&&"number"!==typeof t.score)return-1;if("number"===typeof e.score&&"number"===typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}},{key:"compareByKindAndScore",value:function(e,t){var n=g_[e.kind]||p_,r=g_[t.kind]||p_,i=n.localeCompare(r);return 0===i?this.compareByScore(e,t):i}},{key:"getDocumentSymbols",value:function(e,t,n){return h_(this,void 0,void 0,G.a.mark((function r(){var i,o,a,s,l,c;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ds.create(e,n);case 2:if(i=r.sent,!n.isCancellationRequested){r.next=5;break}return r.abrupt("return",[]);case 5:o=[],a=Object(Ce.a)(i.children.values());try{for(a.s();!(s=a.n()).done;)(l=s.value)instanceof cs?o.push(l.symbol):o.push.apply(o,Object(ct.a)(Ha.a.map(l.children.values(),(function(e){return e.symbol}))))}catch(u){a.e(u)}finally{a.f()}return c=[],t?this.flattenDocumentSymbols(c,o,""):c=o,r.abrupt("return",c.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.range,t.range)})));case 11:case"end":return r.stop()}}),r,this)})))}},{key:"flattenDocumentSymbols",value:function(e,t,n){var r,i=Object(Ce.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||n,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&this.flattenDocumentSymbols(e,o.children,o.name)}}catch(a){i.e(a)}finally{i.f()}}}]),n}(Qv);f_.PREFIX="@",f_.SCOPE_PREFIX=":",f_.PREFIX_BY_CATEGORY="".concat(f_.PREFIX).concat(f_.SCOPE_PREFIX);var p_=Object(Z.a)("property","properties ({0})"),g_=(l_={},Object(zf.a)(l_,5,Object(Z.a)("method","methods ({0})")),Object(zf.a)(l_,11,Object(Z.a)("function","functions ({0})")),Object(zf.a)(l_,8,Object(Z.a)("_constructor","constructors ({0})")),Object(zf.a)(l_,12,Object(Z.a)("variable","variables ({0})")),Object(zf.a)(l_,4,Object(Z.a)("class","classes ({0})")),Object(zf.a)(l_,22,Object(Z.a)("struct","structs ({0})")),Object(zf.a)(l_,23,Object(Z.a)("event","events ({0})")),Object(zf.a)(l_,24,Object(Z.a)("operator","operators ({0})")),Object(zf.a)(l_,10,Object(Z.a)("interface","interfaces ({0})")),Object(zf.a)(l_,2,Object(Z.a)("namespace","namespaces ({0})")),Object(zf.a)(l_,3,Object(Z.a)("package","packages ({0})")),Object(zf.a)(l_,25,Object(Z.a)("typeParameter","type parameters ({0})")),Object(zf.a)(l_,1,Object(Z.a)("modules","modules ({0})")),Object(zf.a)(l_,6,Object(Z.a)("property","properties ({0})")),Object(zf.a)(l_,9,Object(Z.a)("enum","enumerations ({0})")),Object(zf.a)(l_,21,Object(Z.a)("enumMember","enumeration members ({0})")),Object(zf.a)(l_,14,Object(Z.a)("string","strings ({0})")),Object(zf.a)(l_,0,Object(Z.a)("file","files ({0})")),Object(zf.a)(l_,17,Object(Z.a)("array","arrays ({0})")),Object(zf.a)(l_,15,Object(Z.a)("number","numbers ({0})")),Object(zf.a)(l_,16,Object(Z.a)("boolean","booleans ({0})")),Object(zf.a)(l_,18,Object(Z.a)("object","objects ({0})")),Object(zf.a)(l_,19,Object(Z.a)("key","keys ({0})")),Object(zf.a)(l_,7,Object(Z.a)("field","fields ({0})")),Object(zf.a)(l_,13,Object(Z.a)("constant","constants ({0})")),l_),m_=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},v_=function(e,t){return function(n,r){t(n,r,e)}},__=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editorService=e,r.onDidActiveTextEditorControlChange=en.b.None,r}return Object($.a)(n,[{key:"activeTextEditorControl",get:function(){return Object(Uo.n)(this.editorService.getFocusedCodeEditor())}}]),n}(f_);__=m_([v_(0,$e.a)],__),yf.a.as(qv.b.Quickaccess).registerQuickAccessProvider({ctor:__,prefix:f_.PREFIX,helpEntries:[{description:xv.f.quickOutlineActionLabel,prefix:f_.PREFIX,needsEditor:!0},{description:xv.f.quickOutlineByCategoryActionLabel,prefix:f_.PREFIX_BY_CATEGORY,needsEditor:!0}]});var b_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.quickOutline",label:xv.f.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:X.a.hasDocumentSymbolProvider,kbOpts:{kbExpr:X.a.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}return Object($.a)(n,[{key:"run",value:function(e){e.get(Zn.a).quickAccess.show(f_.PREFIX)}}]),n}(Q.b);Object(Q.k)(b_);var y_,S_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function C_(e){var t=e;return Array.isArray(t.items)}function k_(e){var t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(y_||(y_={}));var E_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).prefix=e,i.options=r,i}return Object($.a)(n,[{key:"provide",value:function(e,t){var r,i=this,o=new we.b;e.canAcceptInBackground=!!(null===(r=this.options)||void 0===r?void 0:r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;var a=void 0,s=o.add(new we.d),l=function(){return S_(i,void 0,void 0,G.a.mark((function r(){var i,o,l,c,u,d,h,f,p=this;return G.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=s.value=new we.b,null===a||void 0===a||a.dispose(!0),e.busy=!1,a=new pt.b(t),o=a.token,l=e.value.substr(this.prefix.length).trim(),c=this.getPicks(l,i,o),u=function(t,n){var r,i,o=void 0;if(C_(t)?(i=t.items,o=t.active):i=t,0===i.length){if(n)return!1;l.length>0&&(null===(r=p.options)||void 0===r?void 0:r.noResultsPick)&&(i=[p.options.noResultsPick])}return e.items=i,o&&(e.activeItems=[o]),!0},null!==c){r.next=11;break}r.next=33;break;case 11:if(!k_(c)){r.next=18;break}return d=!1,h=!1,r.next=16,Promise.all([S_(p,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Ee.l)(n.FAST_PICKS_RACE_DELAY);case 2:if(!o.isCancellationRequested){e.next=4;break}return e.abrupt("return");case 4:h||(d=u(c.picks,!0));case 5:case"end":return e.stop()}}),e)}))),S_(p,void 0,void 0,G.a.mark((function t(){var n,r,i,a,s,l,f;return G.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.busy=!0,t.prev=1,t.next=4,c.additionalPicks;case 4:if(n=t.sent,!o.isCancellationRequested){t.next=7;break}return t.abrupt("return");case 7:i=void 0,C_(c.picks)?(r=c.picks.items,i=c.picks.active):r=c.picks,s=void 0,C_(n)?(a=n.items,s=n.active):a=n,(a.length>0||!d)&&(l=void 0,i||s||(f=e.activeItems[0])&&-1!==r.indexOf(f)&&(l=f),u({items:[].concat(Object(ct.a)(r),Object(ct.a)(a)),active:i||s||l}));case 12:return t.prev=12,o.isCancellationRequested||(e.busy=!1),h=!0,t.finish(12);case 16:case"end":return t.stop()}}),t,null,[[1,,12,16]])})))]);case 16:r.next=33;break;case 18:if(c instanceof Promise){r.next=22;break}u(c),r.next=33;break;case 22:return e.busy=!0,r.prev=23,r.next=26,c;case 26:if(f=r.sent,!o.isCancellationRequested){r.next=29;break}return r.abrupt("return");case 29:u(f);case 30:return r.prev=30,o.isCancellationRequested||(e.busy=!1),r.finish(30);case 33:case"end":return r.stop()}}),r,this,[[23,,30,33]])})))};return o.add(e.onDidChangeValue((function(){return l()}))),l(),o.add(e.onDidAccept((function(t){var n=Object(ke.a)(e.selectedItems,1)[0];"function"===typeof(null===n||void 0===n?void 0:n.accept)&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((function(n){var r=n.button,o=n.item;return S_(i,void 0,void 0,G.a.mark((function n(){var i,a,s,c,u,d,h;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("function"!==typeof o.trigger){n.next=25;break}if(!((s=null!==(a=null===(i=o.buttons)||void 0===i?void 0:i.indexOf(r))&&void 0!==a?a:-1)>=0)){n.next=25;break}if("number"!==typeof(c=o.trigger(s,e.keyMods))){n.next=8;break}n.t0=c,n.next=11;break;case 8:return n.next=10,c;case 10:n.t0=n.sent;case 11:if(u=n.t0,!t.isCancellationRequested){n.next=14;break}return n.abrupt("return");case 14:n.t1=u,n.next=n.t1===y_.NO_ACTION?17:n.t1===y_.CLOSE_PICKER?18:n.t1===y_.REFRESH_PICKER?20:n.t1===y_.REMOVE_ITEM?22:25;break;case 17:return n.abrupt("break",25);case 18:return e.hide(),n.abrupt("break",25);case 20:return l(),n.abrupt("break",25);case 22:return-1!==(d=e.items.indexOf(o))&&((h=e.items.slice()).splice(d,1),e.items=h),n.abrupt("break",25);case 25:case"end":return n.stop()}}),n)})))}))),o}}]),n}(we.a);function w_(e,t){return t&&(e.stack||e.stacktrace)?Z.a("stackTrace.format","{0}: {1}",T_(e),O_(e.stack)||O_(e.stacktrace)):T_(e)}function O_(e){return Array.isArray(e)?e.join("\n"):e}function T_(e){return"string"===typeof e.code&&"number"===typeof e.errno&&"string"===typeof e.syscall?Z.a("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||Z.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function x_(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return Z.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){var n=ne.d(e),r=x_(n[0],t);return n.length>1?Z.a("error.moreErrors","{0} ({1} errors in total)",r,n.length):r}if(Uo.j(e))return e;if(e.detail){var i=e.detail;if(i.error)return w_(i.error,t);if(i.exception)return w_(i.exception,t)}return e.stack?w_(e,t):e.message?e.message:Z.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}E_.FAST_PICKS_RACE_DELAY=200;var N_=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},D_=function(e,t){return function(n,r){t(n,r,e)}},L_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},A_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s){var l;return Object(Y.a)(this,n),(l=t.call(this,n.PREFIX,e)).options=e,l.instantiationService=r,l.keybindingService=i,l.commandService=o,l.telemetryService=a,l.notificationService=s,l.commandsHistory=l._register(l.instantiationService.createInstance(I_)),l}return Object($.a)(n,[{key:"getPicks",value:function(e,t,r){return L_(this,void 0,void 0,G.a.mark((function i(){var o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y,S=this;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getCommandPicks(t,r);case 2:if(o=i.sent,!r.isCancellationRequested){i.next=5;break}return i.abrupt("return",[]);case 5:a=[],s=Object(Ce.a)(o);try{for(s.s();!(l=s.n()).done;)c=l.value,u=Object(Uo.n)(n.WORD_FILTER(e,c.label)),d=c.commandAlias?Object(Uo.n)(n.WORD_FILTER(e,c.commandAlias)):void 0,u||d?(c.highlights={label:u,detail:this.options.showAlias?d:void 0},a.push(c)):e===c.commandId&&a.push(c)}catch(C){s.e(C)}finally{s.f()}for(h=new Map,f=0,p=a;fr?-1:1:n?-1:r?1:e.label.localeCompare(t.label)})),v=[],_=!1,b=function(e){var t=a[e],n=S.keybindingService.lookupKeybinding(t.commandId),r=n?Object(Z.a)("commandPickAriaLabelWithKeybinding","{0}, {1}",t.label,n.getAriaLabel()):t.label;0===e&&S.commandsHistory.peek(t.commandId)&&(v.push({type:"separator",label:Object(Z.a)("recentlyUsed","recently used")}),_=!0),0!==e&&_&&!S.commandsHistory.peek(t.commandId)&&(v.push({type:"separator",label:Object(Z.a)("morecCommands","other commands")}),_=!1),v.push(Object.assign(Object.assign({},t),{ariaLabel:r,detail:S.options.showAlias&&t.commandAlias!==t.label?t.commandAlias:void 0,keybinding:n,accept:function(){return L_(S,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"}),e.prev=2,e.next=5,this.commandService.executeCommand(t.commandId);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),Object(ie.d)(e.t0)||this.notificationService.error(Object(Z.a)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,x_(e.t0)));case 10:case"end":return e.stop()}}),e,this,[[2,7]])})))}}))},y=0;y=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},M_=function(e,t){return function(n,r){t(n,r,e)}},P_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},j_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s){var l;return Object(Y.a)(this,n),(l=t.call(this,{showAlias:!1},e,i,o,a,s)).codeEditorService=r,l}return Object($.a)(n,[{key:"getCommandPicks",value:function(){return P_(this,void 0,void 0,G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getCodeEditorCommandPicks());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"activeTextEditorControl",get:function(){return Object(Uo.n)(this.codeEditorService.getFocusedCodeEditor())}}]),n}(function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s){return Object(Y.a)(this,n),t.call(this,e,r,i,o,a,s)}return Object($.a)(n,[{key:"getCodeEditorCommandPicks",value:function(){var e=this.activeTextEditorControl;if(!e)return[];var t,n=[],r=Object(Ce.a)(e.getSupportedActions());try{for(r.s();!(t=r.n()).done;){var i=t.value;n.push({commandId:i.id,commandAlias:i.alias,label:Object(re.h)(i.label)||i.id})}}catch(o){r.e(o)}finally{r.f()}return n}}]),n}(A_));j_=R_([M_(0,Ht.a),M_(1,$e.a),M_(2,Gt.a),M_(3,dn.b),M_(4,pn.a),M_(5,fn.a)],j_),yf.a.as(qv.b.Quickaccess).registerQuickAccessProvider({ctor:j_,prefix:j_.PREFIX,helpEntries:[{description:xv.d.quickCommandHelp,needsEditor:!0}]});var F_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.quickCommand",label:xv.d.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}return Object($.a)(n,[{key:"run",value:function(e){e.get(Zn.a).quickAccess.show(j_.PREFIX)}}]),n}(Q.b);Object(Q.k)(F_);var B_=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},U_=function(e,t){return function(n,r){t(n,r,e)}},H_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(e,r,i,o,a,s,l){return Object(Y.a)(this,n),t.call(this,!0,e,r,i,o,a,s,l)}return n}(ic);H_=B_([U_(1,te.b),U_(2,$e.a),U_(3,fn.a),U_(4,Ht.a),U_(5,Vn.a),U_(6,ir.a)],H_),Object(Q.m)(ic.ID,H_);var z_=function(e){Object(q.a)(n,e);var t=Object(K.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this,{id:"editor.action.toggleHighContrast",label:xv.i.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}))._originalThemeName=null,e}return Object($.a)(n,[{key:"run",value:function(e,t){var n=e.get(Uv.a);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getColorTheme().themeName,n.setTheme("hc-black"))}}]),n}(Q.b);Object(Q.k)(z_)},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;cr&&(o+=c.attrs.colspan)}for(var u=0;u1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[],i=0,o=null,a=[],s=0,l=t*n;s=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:_-y});break}for(var S=i+y*t,C=0;C0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function C(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function k(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:S(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var i=e.nodeBefore,o=e.pos;i;i=i.lastChild,o--){var a=i.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(o-i.nodeSize)}}(t.$head)}function E(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function w(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function O(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function T(e){return p.get(e.node(-1)).findCell(e.pos-e.start(-1))}function x(e){return p.get(e.node(-1)).colCount(e.pos-e.start(-1))}function N(e,t,n){var r=e.start(-1),i=p.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==i?null:e.node(0).resolve(r+i)}function D(e,t,n){var r={};for(var i in e)r[i]=e[i];return r[t]=n,r}function L(e,t,n){void 0===n&&(n=1);var r=D(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function A(e,t,n){void 0===n&&(n=1);var r=D(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var i=0;i0||m>0){var v=f.attrs;g>0&&(v=L(v,0,g)),m>0&&(v=L(v,v.colspan-m,m)),f=h.leftr.bottom){var _=D(f.attrs,"rowspan",Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top));f=h.top0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=p.get(e.node(-1)),i=e.start(-1),o=r.findCell(e.pos-i),a=r.findCell(n.pos-i),s=e.node(0);return o.top<=a.top?(o.top>0&&(e=s.resolve(i+r.map[o.left])),a.bottom0&&(n=s.resolve(i+r.map[a.left])),o.bottom0)return!1;var i=n+this.$anchorCell.nodeAfter.attrs.colspan,o=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,o)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=p.get(e.node(-1)),i=e.start(-1),o=r.findCell(e.pos-i),a=r.findCell(n.pos-i),s=e.node(0);return o.left<=a.left?(o.left>0&&(e=s.resolve(i+r.map[o.top*r.width])),a.right0&&(n=s.resolve(i+r.map[a.top*r.width])),o.right0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var i=t.firstChild,o=i.type.spec.tableRole,s=i.type.schema,l=[];if("row"==o)for(var c=0;c=0;o--)for(var s=i.child(o).attrs,l=s.rowspan,c=s.colspan,u=r;u=t.length&&t.push(a.Fragment.empty),n[f]t&&(p=p.type.create(L(p.attrs,p.attrs.colspan,h+p.attrs.colspan-t),p.content)),d.push(p),h+=p.attrs.colspan;for(var g=1;gn&&(C=C.type.create(D(C.attrs,"rowspan",Math.max(1,n-C.attrs.rowspan)),C.content)),b.push(C)}m.push(a.Fragment.from(b))}o=m,i=n}return{width:r,height:i,rows:o}}function U(e,t,n,r,i,o,a,s){if(0==a||a==t.height)return!1;for(var l=!1,c=i;ct.width)for(var d=0,h=0;dt.height){for(var v=[],_=0,y=(t.height-1)*t.width;_=t.width)&&n.nodeAt(t.map[y+_]).type==u.header_cell;v.push(S?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}for(var C=u.row.create(null,a.Fragment.from(v)),k=[],E=t.height;E=0;i--){var a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){var s=r.before(i),l="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function X(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function J(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?S(e.state.doc.resolve(n.pos)):null}var ee=new o.PluginKey("fix-tables");function te(e,t,n,r){var i=e.childCount,o=t.childCount;e:for(var a=0,s=0;a0){var k="cell";y.firstChild&&(k=y.firstChild.type.spec.tableRole);for(var E=[],w=0;w0?-1:0;I(r,o,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s0&&n0&&r.map[l-1]==c||n0?-1:0;ce(r,o,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,d=r.width*n;u0&&n0&&h==r.map[d-r.width]){var f=i.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(c).map(h+o),null,D(f,"rowspan",f.rowspan-1)),u+=f.colspan-1}else if(n0&&i[a]==i[a-1]||t.right0&&i[o]==i[o-n]||t.bottom0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from)))return!1;i=S(o.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=D(a,"rowspan",1)),a.colspan>1&&(a=D(a,"colspan",1));for(var c,u=re(t),d=t.tr,h=0;h=0;r--){var o=e.node(-1).child(r);if(o.childCount)return i-1-o.lastChild.nodeSize;i-=o.nodeSize}}else{if(e.index()0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Te=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xe(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function xe(e,t,n,r,i,o){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,d=0;u-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,i){var o=Ne.getState(e.state);if(!o.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),c=l.left,u=l.right;t.clientX-c<=n?s=Ae(e,t,"left"):u-t.clientX<=n&&(s=Ae(e,t,"right"))}if(s!=o.activeHandle){if(!i&&-1!==s){var d=e.state.doc.resolve(s),h=d.node(-1),f=p.get(h),g=d.start(-1);if(f.colCount(d.pos-g)+d.nodeAfter.attrs.colspan-1==f.width-1)return}Re(e,s)}}}(e,n,t,0,i)},mouseleave:function(e){!function(e){var t=Ne.getState(e.state);t.activeHandle>-1&&!t.dragging&&Re(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=Ne.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var i=e.state.doc.nodeAt(r.activeHandle),o=function(e,t,n){var r=n.colspan,i=n.colwidth,o=i&&i[i.length-1];if(o)return o;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(i)for(var c=0;c-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),i=r.node(-1),o=p.get(i),a=r.start(-1),s=o.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,c=0;c=0&&!(t.after(o+1)=0&&!(n.before(a+1)>n.start(a));a--,i--);return r==i&&/row|table/.test(t.node(o).type.spec.tableRole)}(a)?r=o.TextSelection.create(s,a.from):a instanceof o.TextSelection&&function(e){for(var t,n,r=e.$from,i=e.$to,o=r.depth;o>0;o--){var a=r.node(o);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=i.depth;s>0;s--){var l=i.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===i.parentOffset}(a)&&(r=o.TextSelection.create(s,a.$from.start(),a.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,ne(r,n),t)}})}Le.prototype.apply=function(e){var t=this,n=e.getMeta(Ne);if(n&&null!=n.setHandle)return new Le(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Le(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);E(e.doc.resolve(r))||(r=null),t=new Le(r,t.dragging)}return t}},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,l,"next",e)}function l(e){n(a,i,o,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){var r=n(279);e.exports=function(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},function(e,t,n){"use strict";var r=n(353),i=n(355),o=n(358),a=n(359),s=n(362),l=n(746);e.exports=r([o,i,a,s,l])},function(e,t,n){"use strict";var r=0;function i(){return Math.pow(2,++r)}t.boolean=i(),t.booleanish=i(),t.overloadedBoolean=i(),t.number=i(),t.spaceSeparated=i(),t.commaSeparated=i(),t.commaOrSpaceSeparated=i()},function(e,t,n){"use strict";var r=n(290),i=n(356),o=n(357),a="data";e.exports=function(e,t){var n=r(t),h=t,f=o;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===a&&s.test(t)&&("-"===t.charAt(4)?h=function(e){var t=e.slice(5).replace(l,d);return a+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(l.test(t))return e;"-"!==(t=t.replace(c,u)).charAt(0)&&(t="-"+t);return a+t}(t),f=i);return new f(h,t)};var s=/^data[-\w.:]+$/i,l=/-[a-z]/g,c=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},function(e,t,n){"use strict";var r;e.exports=function(e){var t,n="&"+e+";";if((r=r||document.createElement("i")).innerHTML=n,59===(t=r.textContent).charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==n&&t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={errors:{controlled:"A component is changing a react-medium-image-zoom component from a controlled component to an uncontrolled one. ImageZoom elements should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component.",uncontrolled:"A component is changing a react-medium-image-zoom component from an uncontrolled component to a controlled one. ImageZoom elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled image zoom element for the lifetime of the component."},styles:{image:{cursor:"zoom-in"},zoomImage:{cursor:"zoom-out",position:"absolute",transition:"transform 300ms",transform:"translate3d(0, 0, 0) scale(1)",transformOrigin:"center center",willChange:"transform, top, left"},zoomContainer:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:999},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"#fff",opacity:0,transition:"opacity 300ms"}},transitionDuration:300};t.default=r},function(e,t){e.exports=String.fromCharCode},function(e,t){e.exports=Object.assign},function(e,t,n){var r=n(183);e.exports=r(/[A-Za-z]/)},function(e,t,n){"use strict";function r(e){if("string"===typeof e)return function(e){return t;function t(t){return Boolean(t&&t.type===e)}}(e);if(null===e||void 0===e)return a;if("object"===typeof e)return("length"in e?o:i)(e);if("function"===typeof e)return e;throw new Error("Expected function, string, or object as test")}function i(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function o(e){var t=function(e){for(var t=[],n=e.length,i=-1;++i=c.DIGIT_0&&e<=c.DIGIT_9}function Ue(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_Z}function He(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_Z}function ze(e){return He(e)||Ue(e)}function Ve(e){return ze(e)||Be(e)}function We(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_F}function Ge(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_F}function qe(e){return e+32}function Ke(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function Ye(e){return String.fromCharCode(qe(e))}function $e(e,t){for(var n=s[++e],r=++e,i=r+n-1;r<=i;){var o=r+i>>>1,a=s[o];if(at))return s[o+n];i=o-1}}return-1}var Qe=function(){function e(){r(this,e),this.preprocessor=new o,this.tokenQueue=[],this.allowCDATA=!1,this.state=h,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}return i(e,[{key:"_err",value:function(){}},{key:"_errOnNextCodePoint",value:function(e){this._consume(),this._err(e),this._unconsume()}},{key:"getNextToken",value:function(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}},{key:"write",value:function(e,t){this.active=!0,this.preprocessor.write(e,t)}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}},{key:"_ensureHibernation",value:function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:e.HIBERNATION_TOKEN}),!0}return!1}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}},{key:"_reconsumeInState",value:function(e){this.state=e,this._unconsume()}},{key:"_consumeSequenceIfMatch",value:function(e,t,n){for(var r=0,i=!0,o=e.length,a=0,s=t,l=void 0;a0&&(s=this._consume(),r++),s===c.EOF){i=!1;break}if(s!==(l=e[a])&&(n||s!==qe(l))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}},{key:"_isTempBufferEqualToScriptString",value:function(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(var e=0;e0&&this._err(l.endTagWithAttributes),t.selfClosing&&this._err(l.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}},{key:"_emitCurrentCharacterToken",value:function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}},{key:"_emitEOFToken",value:function(){this._createEOFToken(),this._emitCurrentToken()}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(t){var n=e.CHARACTER_TOKEN;Fe(t)?n=e.WHITESPACE_CHARACTER_TOKEN:t===c.NULL&&(n=e.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,Ke(t))}},{key:"_emitSeveralCodePoints",value:function(e){for(var t=0;t-1;){var i=s[r],o=i<7;o&&1&i&&(t=2&i?[s[++r],s[++r]]:[s[++r]],n=0);var a=this._consume();if(this.tempBuff.push(a),n++,a===c.EOF)break;r=o?4&i?$e(r,a):-1:a===i?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}},{key:"_isCharacterReferenceInAttribute",value:function(){return this.returnState===K||this.returnState===Y||this.returnState===$}},{key:"_isCharacterReferenceAttributeQuirk",value:function(e){if(!e&&this._isCharacterReferenceInAttribute()){var t=this._consume();return this._unconsume(),t===c.EQUALS_SIGN||Ve(t)}return!1}},{key:"_flushCodePointsConsumedAsCharacterReference",value:function(){if(this._isCharacterReferenceInAttribute())for(var e=0;e")):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.state=L,this._emitChars(a.REPLACEMENT_CHARACTER)):e===c.EOF?(this._err(l.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=L,this._emitCodePoint(e))}},{key:R,value:function(e){e===c.SOLIDUS?(this.tempBuff=[],this.state=M):ze(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(j)):(this._emitChars("<"),this._reconsumeInState(L))}},{key:M,value:function(e){ze(e)?(this._createEndTagToken(),this._reconsumeInState(P)):(this._emitChars("")):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.state=F,this._emitChars(a.REPLACEMENT_CHARACTER)):e===c.EOF?(this._err(l.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=F,this._emitCodePoint(e))}},{key:H,value:function(e){e===c.SOLIDUS?(this.tempBuff=[],this.state=z,this._emitChars("/")):this._reconsumeInState(F)}},{key:z,value:function(e){Fe(e)||e===c.SOLIDUS||e===c.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?L:F,this._emitCodePoint(e)):Ue(e)?(this.tempBuff.push(qe(e)),this._emitCodePoint(e)):He(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(F)}},{key:V,value:function(e){Fe(e)||(e===c.SOLIDUS||e===c.GREATER_THAN_SIGN||e===c.EOF?this._reconsumeInState(G):e===c.EQUALS_SIGN?(this._err(l.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=W):(this._createAttr(""),this._reconsumeInState(W)))}},{key:W,value:function(e){Fe(e)||e===c.SOLIDUS||e===c.GREATER_THAN_SIGN||e===c.EOF?(this._leaveAttrName(G),this._unconsume()):e===c.EQUALS_SIGN?this._leaveAttrName(q):Ue(e)?this.currentAttr.name+=Ye(e):e===c.QUOTATION_MARK||e===c.APOSTROPHE||e===c.LESS_THAN_SIGN?(this._err(l.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ke(e)):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentAttr.name+=a.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ke(e)}},{key:G,value:function(e){Fe(e)||(e===c.SOLIDUS?this.state=Z:e===c.EQUALS_SIGN?this.state=q:e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(W)))}},{key:q,value:function(e){Fe(e)||(e===c.QUOTATION_MARK?this.state=K:e===c.APOSTROPHE?this.state=Y:e===c.GREATER_THAN_SIGN?(this._err(l.missingAttributeValue),this.state=h,this._emitCurrentToken()):this._reconsumeInState($))}},{key:K,value:function(e){e===c.QUOTATION_MARK?this.state=Q:e===c.AMPERSAND?(this.returnState=K,this.state=Ne):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}},{key:Y,value:function(e){e===c.APOSTROPHE?this.state=Q:e===c.AMPERSAND?(this.returnState=Y,this.state=Ne):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}},{key:$,value:function(e){Fe(e)?this._leaveAttrValue(V):e===c.AMPERSAND?(this.returnState=$,this.state=Ne):e===c.GREATER_THAN_SIGN?(this._leaveAttrValue(h),this._emitCurrentToken()):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===c.QUOTATION_MARK||e===c.APOSTROPHE||e===c.LESS_THAN_SIGN||e===c.EQUALS_SIGN||e===c.GRAVE_ACCENT?(this._err(l.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ke(e)):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ke(e)}},{key:Q,value:function(e){Fe(e)?this._leaveAttrValue(V):e===c.SOLIDUS?this._leaveAttrValue(Z):e===c.GREATER_THAN_SIGN?(this._leaveAttrValue(h),this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):(this._err(l.missingWhitespaceBetweenAttributes),this._reconsumeInState(V))}},{key:Z,value:function(e){e===c.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInTag),this._emitEOFToken()):(this._err(l.unexpectedSolidusInTag),this._reconsumeInState(V))}},{key:X,value:function(e){e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===c.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):this.currentToken.data+=Ke(e)}},{key:J,value:function(e){this._consumeSequenceIfMatch(u.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=ee):this._consumeSequenceIfMatch(u.DOCTYPE_STRING,e,!1)?this.state=ue:this._consumeSequenceIfMatch(u.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=Oe:(this._err(l.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=X):this._ensureHibernation()||(this._err(l.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(X))}},{key:ee,value:function(e){e===c.HYPHEN_MINUS?this.state=te:e===c.GREATER_THAN_SIGN?(this._err(l.abruptClosingOfEmptyComment),this.state=h,this._emitCurrentToken()):this._reconsumeInState(ne)}},{key:te,value:function(e){e===c.HYPHEN_MINUS?this.state=le:e===c.GREATER_THAN_SIGN?(this._err(l.abruptClosingOfEmptyComment),this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ne))}},{key:ne,value:function(e){e===c.HYPHEN_MINUS?this.state=se:e===c.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=re):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(l.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ke(e)}},{key:re,value:function(e){e===c.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=ie):e===c.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ne)}},{key:ie,value:function(e){e===c.HYPHEN_MINUS?this.state=oe:this._reconsumeInState(ne)}},{key:oe,value:function(e){e===c.HYPHEN_MINUS?this.state=ae:this._reconsumeInState(se)}},{key:ae,value:function(e){e!==c.GREATER_THAN_SIGN&&e!==c.EOF&&this._err(l.nestedComment),this._reconsumeInState(le)}},{key:se,value:function(e){e===c.HYPHEN_MINUS?this.state=le:e===c.EOF?(this._err(l.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ne))}},{key:le,value:function(e){e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===c.EXCLAMATION_MARK?this.state=ce:e===c.HYPHEN_MINUS?this.currentToken.data+="-":e===c.EOF?(this._err(l.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ne))}},{key:ce,value:function(e){e===c.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=se):e===c.GREATER_THAN_SIGN?(this._err(l.incorrectlyClosedComment),this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ne))}},{key:ue,value:function(e){Fe(e)?this.state=de:e===c.GREATER_THAN_SIGN?this._reconsumeInState(de):e===c.EOF?(this._err(l.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(de))}},{key:de,value:function(e){Fe(e)||(Ue(e)?(this._createDoctypeToken(Ye(e)),this.state=he):e===c.NULL?(this._err(l.unexpectedNullCharacter),this._createDoctypeToken(a.REPLACEMENT_CHARACTER),this.state=he):e===c.GREATER_THAN_SIGN?(this._err(l.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ke(e)),this.state=he))}},{key:he,value:function(e){Fe(e)?this.state=fe:e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):Ue(e)?this.currentToken.name+=Ye(e):e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.name+=a.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ke(e)}},{key:fe,value:function(e){Fe(e)||(e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(u.PUBLIC_STRING,e,!1)?this.state=pe:this._consumeSequenceIfMatch(u.SYSTEM_STRING,e,!1)?this.state=ye:this._ensureHibernation()||(this._err(l.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}},{key:pe,value:function(e){Fe(e)?this.state=ge:e===c.QUOTATION_MARK?(this._err(l.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=me):e===c.APOSTROPHE?(this._err(l.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=ve):e===c.GREATER_THAN_SIGN?(this._err(l.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}},{key:ge,value:function(e){Fe(e)||(e===c.QUOTATION_MARK?(this.currentToken.publicId="",this.state=me):e===c.APOSTROPHE?(this.currentToken.publicId="",this.state=ve):e===c.GREATER_THAN_SIGN?(this._err(l.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}},{key:me,value:function(e){e===c.QUOTATION_MARK?this.state=_e:e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(l.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ke(e)}},{key:ve,value:function(e){e===c.APOSTROPHE?this.state=_e:e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(l.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ke(e)}},{key:_e,value:function(e){Fe(e)?this.state=be:e===c.GREATER_THAN_SIGN?(this.state=h,this._emitCurrentToken()):e===c.QUOTATION_MARK?(this._err(l.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ce):e===c.APOSTROPHE?(this._err(l.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=ke):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}},{key:be,value:function(e){Fe(e)||(e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===c.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ce):e===c.APOSTROPHE?(this.currentToken.systemId="",this.state=ke):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}},{key:ye,value:function(e){Fe(e)?this.state=Se:e===c.QUOTATION_MARK?(this._err(l.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ce):e===c.APOSTROPHE?(this._err(l.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=ke):e===c.GREATER_THAN_SIGN?(this._err(l.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we))}},{key:Se,value:function(e){Fe(e)||(e===c.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ce):e===c.APOSTROPHE?(this.currentToken.systemId="",this.state=ke):e===c.GREATER_THAN_SIGN?(this._err(l.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=h,this._emitCurrentToken()):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(we)))}},{key:Ce,value:function(e){e===c.QUOTATION_MARK?this.state=Ee:e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(l.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ke(e)}},{key:ke,value:function(e){e===c.APOSTROPHE?this.state=Ee:e===c.NULL?(this._err(l.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(l.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ke(e)}},{key:Ee,value:function(e){Fe(e)||(e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===c.EOF?(this._err(l.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(l.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(we)))}},{key:we,value:function(e){e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=h):e===c.NULL?this._err(l.unexpectedNullCharacter):e===c.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}},{key:Oe,value:function(e){e===c.RIGHT_SQUARE_BRACKET?this.state=Te:e===c.EOF?(this._err(l.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}},{key:Te,value:function(e){e===c.RIGHT_SQUARE_BRACKET?this.state=xe:(this._emitChars("]"),this._reconsumeInState(Oe))}},{key:xe,value:function(e){e===c.GREATER_THAN_SIGN?this.state=h:e===c.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Oe))}},{key:Ne,value:function(e){this.tempBuff=[c.AMPERSAND],e===c.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Ae):Ve(e)?this._reconsumeInState(De):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:De,value:function(e){var t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[c.AMPERSAND];else if(t){var n=this.tempBuff[this.tempBuff.length-1]===c.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(l.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Le}},{key:Le,value:function(e){Ve(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ke(e):this._emitCodePoint(e):(e===c.SEMICOLON&&this._err(l.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}},{key:Ae,value:function(e){this.charRefCode=0,e===c.LATIN_SMALL_X||e===c.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Ie):this._reconsumeInState(Re)}},{key:Ie,value:function(e){!function(e){return Be(e)||We(e)||Ge(e)}(e)?(this._err(l.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(Me)}},{key:Re,value:function(e){Be(e)?this._reconsumeInState(Pe):(this._err(l.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:Me,value:function(e){We(e)?this.charRefCode=16*this.charRefCode+e-55:Ge(e)?this.charRefCode=16*this.charRefCode+e-87:Be(e)?this.charRefCode=16*this.charRefCode+e-48:e===c.SEMICOLON?this.state=je:(this._err(l.missingSemicolonAfterCharacterReference),this._reconsumeInState(je))}},{key:Pe,value:function(e){Be(e)?this.charRefCode=10*this.charRefCode+e-48:e===c.SEMICOLON?this.state=je:(this._err(l.missingSemicolonAfterCharacterReference),this._reconsumeInState(je))}},{key:je,value:function(){if(this.charRefCode===c.NULL)this._err(l.nullCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(l.characterReferenceOutsideUnicodeRange),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(a.isSurrogate(this.charRefCode))this._err(l.surrogateCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(a.isUndefinedCodePoint(this.charRefCode))this._err(l.noncharacterCharacterReference);else if(a.isControlCodePoint(this.charRefCode)||this.charRefCode===c.CARRIAGE_RETURN){this._err(l.controlCharacterReference);var e=d[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}]),e}();Qe.CHARACTER_TOKEN="CHARACTER_TOKEN",Qe.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Qe.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Qe.START_TAG_TOKEN="START_TAG_TOKEN",Qe.END_TAG_TOKEN="END_TAG_TOKEN",Qe.COMMENT_TOKEN="COMMENT_TOKEN",Qe.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Qe.EOF_TOKEN="EOF_TOKEN",Qe.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Qe.MODE={DATA:h,RCDATA:f,RAWTEXT:p,SCRIPT_DATA:g,PLAINTEXT:m},Qe.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=Qe},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(209),i=n(263);function o(e,t,n){return(o=Object(i.a)()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&Object(r.a)(o,n.prototype),o}).apply(null,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var r=n(6),i=n(24),o=n(15),a=n(232),s=n(64),l=n(84),c=n(32),u="**",d="[/\\\\]",h="[^/\\\\]",f=/\//g;function p(e){switch(e){case 0:return"";case 1:return"".concat(h,"*?");default:return"(?:".concat(d,"|").concat(h,"+").concat(d,"|").concat(d).concat(h,"+)*?")}}function g(e,t){if(!e)return[];var n,i=[],o=!1,a=!1,s="",l=Object(r.a)(e);try{for(l.s();!(n=l.n()).done;){var c=n.value;switch(c){case t:if(!o&&!a){i.push(s),s="";continue}break;case"{":o=!0;break;case"}":o=!1;break;case"[":a=!0;break;case"]":a=!1}s+=c}}catch(u){l.e(u)}finally{l.f()}return s&&i.push(s),i}function m(e){if(!e)return"";var t="",n=g(e,"/");if(n.every((function(e){return e===u})))t=".*";else{var i=!1;n.forEach((function(e,a){if(e!==u){var s,l=!1,c="",f=!1,v="",_=Object(r.a)(e);try{for(_.s();!(s=_.n()).done;){var b=s.value;if("}"!==b&&l)c+=b;else if(!f||"]"===b&&v)switch(b){case"{":l=!0;continue;case"[":f=!0;continue;case"}":var y=g(c,","),S="(?:".concat(y.map((function(e){return m(e)})).join("|"),")");t+=S,l=!1,c="";break;case"]":t+="["+v+"]",f=!1,v="";break;case"?":t+=h;continue;case"*":t+=p(1);continue;default:t+=o.v(b)}else{v+="-"===b?b:"^"!==b&&"!"!==b||v?"/"===b?"":o.v(b):"^"}}}catch(C){_.e(C)}finally{_.f()}a1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return E;if("string"===typeof e||L(e)){var n=O(e,t);if(n===w)return E;var r=function(e,t){return!!n(e,t)};return n.allBasenames&&(r.allBasenames=n.allBasenames),n.allPaths&&(r.allPaths=n.allPaths),r}return A(e,t)}(e)(t,void 0,n)}function L(e){var t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function A(e,t){var n=I(Object.getOwnPropertyNames(e).map((function(n){return function(e,t,n){if(!1===t)return w;var r=O(e,n);if(r===w)return w;if("boolean"===typeof t)return r;if(t){var i=t.when;if("string"===typeof i){var o=function(t,n,o,a){if(!a||!r(t,n))return null;var s=a(i.replace("$(basename)",o));return Object(c.i)(s)?s.then((function(t){return t?e:null})):s?e:null};return o.requiresSiblings=!0,o}}return r}(n,e[n],t)})).filter((function(e){return e!==w}))),r=n.length;if(!r)return w;if(!n.some((function(e){return!!e.requiresSiblings}))){if(1===r)return n[0];var o=function(e,t){for(var r=0,i=n.length;r0;n--){var o=e.charCodeAt(n-1);if(47===o||92===o)break}t=e.substr(n)}var a=i.indexOf(t);return-1!==a?r[a]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;var l=e.filter((function(e){return!e.basenames}));return l.push(s),l}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(1),i=n(0),o=n(141),a=function e(t,n){Object(i.a)(this,e),this.index=t,this.remainder=n},s=function(){function e(t){Object(i.a)(this,e),this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return Object(r.a)(e,[{key:"insertValues",value:function(e,t){e=Object(o.a)(e);var n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"changeValue",value:function(e,t){return e=Object(o.a)(e),t=Object(o.a)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"getTotalValue",value:function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}},{key:"getAccumulatedValue",value:function(e){return e<0?0:(e=Object(o.a)(e),this._getAccumulatedValue(e))}},{key:"_getAccumulatedValue",value:function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}},{key:"getIndexOf",value:function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,r=0,i=0,o=0;t<=n;)if(r=t+(n-t)/2|0,e<(o=(i=this.prefixSum[r])-this.values[r]))n=r-1;else{if(!(e>=i))break;t=r+1}return new a(r,e-o)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(65),a=n(12),s={JSONContribution:"base.contributions.json"};var l=new(function(){function e(){Object(r.a)(this,e),this._onDidChangeSchema=new a.a,this.schemasById={}}return Object(i.a)(e,[{key:"registerSchema",value:function(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}},{key:"notifySchemaChanged",value:function(e){this._onDidChangeSchema.fire(e)}}]),e}());o.a.add(s.JSONContribution,l)},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=Object.prototype.hasOwnProperty;function a(e,t){var n=function(n){if(o.call(e,n)&&!1===t({key:n,value:e[n]},(function(){delete e[n]})))return{v:void 0}};for(var r in e){var i=n(r);if("object"===typeof i)return i.v}}var s=function(){function e(){Object(r.a)(this,e),this.map=new Map}return Object(i.a)(e,[{key:"add",value:function(e,t){var n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}},{key:"delete",value:function(e,t){var n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}},{key:"forEach",value:function(e,t){var n=this.map.get(e);n&&n.forEach(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),i=n(1),o=n(17),a=n(16),s=n(4),l=n(5),c=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,i,o){var a;return Object(r.a)(this,n),(a=t.call(this)).referenceDomElement=e,a.changeCallback=o,a.width=-1,a.height=-1,a.resizeObserver=null,a.measureReferenceDomElementToken=-1,a.measureReferenceDomElement(!1,i),a}return Object(i.a)(n,[{key:"dispose",value:function(){this.stopObserving(),Object(o.a)(Object(a.a)(n.prototype),"dispose",this).call(this)}},{key:"getWidth",value:function(){return this.width}},{key:"getHeight",value:function(){return this.height}},{key:"startObserving",value:function(){var e=this;"undefined"!==typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((function(t){t&&t[0]&&t[0].contentRect?e.observe({width:t[0].contentRect.width,height:t[0].contentRect.height}):e.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.observe()}),100))}},{key:"stopObserving",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}},{key:"observe",value:function(e){this.measureReferenceDomElement(!0,e)}},{key:"measureReferenceDomElement",value:function(e,t){var n=0,r=0;t?(n=t.width,r=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,r=this.referenceDomElement.clientHeight),n=Math.max(5,n),r=Math.max(5,r),this.width===n&&this.height===r||(this.width=n,this.height=r,e&&this.changeCallback())}}]),n}(n(7).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(1),o=function(){function e(t,n,i,o,a,s){Object(r.a)(this,e),this.id=t,this.label=n,this.alias=i,this._precondition=o,this._run=a,this._contextKeyService=s}return Object(i.a)(e,[{key:"isSupported",value:function(){return this._contextKeyService.contextMatchesRules(this._precondition)}},{key:"run",value:function(){return this.isSupported()?this._run():Promise.resolve(void 0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("markerDecorationsService")},function(e,t,n){"use strict";e.exports=n(557)},function(e,t,n){"use strict";function r(e){return(r="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})(e)}n.d(t,"a",(function(){return o}));var i=n(36);function o(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?Object(i.a)(e):t}},function(e,t,n){var r=n(244),i=n(517),o=n(518),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(318);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={almostBlack:"#181A1B",lightBlack:"#2F3336",almostWhite:"#E6E6E6",white:"#FFF",white10:"rgba(255, 255, 255, 0.1)",black:"#000",black10:"rgba(0, 0, 0, 0.1)",primary:"#1AB6FF",greyLight:"#F4F7FA",grey:"#E8EBED",greyMid:"#C5CCD3",greyDark:"#DAE1E9"};t.base=Object.assign(Object.assign({},r),{fontFamily:"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen, Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif",fontFamilyMono:"'SFMono-Regular',Consolas,'Liberation Mono', Menlo, Courier,monospace",fontWeight:400,zIndex:100,link:r.primary,placeholder:"#B1BECC",textSecondary:"#4E5C6E",textLight:r.white,textHighlight:"#b3e7ff",selected:r.primary,codeComment:"#6a737d",codePunctuation:"#5e6687",codeNumber:"#d73a49",codeProperty:"#c08b30",codeTag:"#3d8fd1",codeString:"#032f62",codeSelector:"#6679cc",codeAttr:"#c76b29",codeEntity:"#22a2c9",codeKeyword:"#d73a49",codeFunction:"#6f42c1",codeStatement:"#22a2c9",codePlaceholder:"#3d8fd1",codeInserted:"#202746",codeImportant:"#c94922",blockToolbarBackground:r.white,blockToolbarTrigger:r.greyMid,blockToolbarTriggerIcon:r.white,blockToolbarItem:r.almostBlack,blockToolbarText:r.almostBlack,blockToolbarHoverBackground:r.greyLight,blockToolbarDivider:r.greyMid,noticeInfoBackground:"#F5BE31",noticeInfoText:r.almostBlack,noticeTipBackground:"#9E5CF7",noticeTipText:r.white,noticeWarningBackground:"#FF5C80",noticeWarningText:r.white}),t.light=Object.assign(Object.assign({},t.base),{background:r.white,text:r.almostBlack,code:r.lightBlack,cursor:r.black,divider:r.greyMid,toolbarBackground:r.lightBlack,toolbarHoverBackground:r.black,toolbarInput:r.white10,toolbarItem:r.white,tableDivider:r.greyMid,tableSelected:r.primary,tableSelectedBackground:"#E5F7FF",quote:r.greyDark,codeBackground:r.greyLight,codeBorder:r.grey,horizontalRule:r.greyMid,imageErrorBackground:r.greyLight,scrollbarBackground:r.greyLight,scrollbarThumb:r.greyMid}),t.dark=Object.assign(Object.assign({},t.base),{background:r.almostBlack,text:r.almostWhite,code:r.almostWhite,cursor:r.white,divider:"#4E5C6E",placeholder:"#52657A",toolbarBackground:r.white,toolbarHoverBackground:r.greyMid,toolbarInput:r.black10,toolbarItem:r.lightBlack,tableDivider:r.lightBlack,tableSelected:r.primary,tableSelectedBackground:"#002333",quote:r.greyDark,codeBackground:r.black,codeBorder:r.lightBlack,codeString:"#3d8fd1",horizontalRule:r.lightBlack,imageErrorBackground:"rgba(0, 0, 0, 0.5)",scrollbarBackground:r.black,scrollbarThumb:r.lightBlack}),t.default=t.light},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return function(t){var n=t.selection,r=n.from,i=n.$from,o=n.to;return n.empty?e.isInSet(t.storedMarks||i.marks()):t.doc.rangeHasMark(r,o,e)}}},function(e,t,n){var r=n(661);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=1&&h&&d.depth-h.depth<=1){if(h.node.type===e)return i.liftListItem(t)(n,r);if(a.default(h.node,s)&&e.validContent(h.node.content)){var f=n.tr;return f.setNodeMarkup(h.pos,e),r&&r(f),!1}}return i.wrapInList(e)(n,r)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"addListNodes",(function(){return h})),n.d(t,"bulletList",(function(){return c})),n.d(t,"liftListItem",(function(){return g})),n.d(t,"listItem",(function(){return u})),n.d(t,"orderedList",(function(){return l})),n.d(t,"sinkListItem",(function(){return m})),n.d(t,"splitListItem",(function(){return p})),n.d(t,"wrapInList",(function(){return f}));var r=n(68),i=n(31),o=["ol",0],a=["ul",0],s=["li",0],l={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?o:["ol",{start:e.attrs.order},0]}},c={parseDOM:[{tag:"ul"}],toDOM:function(){return a}},u={parseDOM:[{tag:"li"}],toDOM:function(){return s},defining:!0};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var i in t)n[i]=t[i];return n}function h(e,t,n){return e.append({ordered_list:d(l,{content:"list_item+",group:n}),bullet_list:d(c,{content:"list_item+",group:n}),list_item:d(u,{content:t})})}function f(e,t){return function(n,o){var a=n.selection,s=a.$from,l=a.$to,c=s.blockRange(l),u=!1,d=c;if(!c)return!1;if(c.depth>=2&&s.node(c.depth-1).type.compatibleContent(e)&&0==c.startIndex){if(0==s.index(c.depth-1))return!1;var h=n.doc.resolve(c.start-2);d=new i.NodeRange(h,h,c.depth),c.endIndex=0;l--)s=i.Fragment.from(n[l].type.create(n[l].attrs,s));e.step(new r.b(t.start-(o?2:0),t.end,t.start,t.end,new i.Slice(s,0,0),n.length,!0));for(var c=0,u=0;u0,h=a.depth-(d?1:2);h>=a.depth-3;h--)u=i.Fragment.from(a.node(h).copy(u));u=u.append(i.Fragment.from(e.createAndFill()));var f=t.tr.replace(a.before(d?null:-1),a.after(-3),new i.Slice(u,d?3:2,2));f.setSelection(t.selection.constructor.near(f.doc.resolve(a.pos+(d?3:2)))),n(f.scrollIntoView())}return!0}var p=s.pos==a.end()?c.contentMatchAt(0).defaultType:null,g=t.tr.delete(a.pos,s.pos),m=p&&[null,{type:p}];return!!Object(r.f)(g.doc,a.pos,2,m)&&(n&&n(g.split(a.pos,2,m).scrollIntoView()),!0)}}function g(e){return function(t,n){var o=t.selection,a=o.$from,s=o.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));return!!l&&(!n||(a.node(l.depth-1).type==e?function(e,t,n,o){var a=e.tr,s=o.end,l=o.$to.end(o.depth);sc;l--)s-=a.child(l).nodeSize,o.delete(s-1,s+1);var u=o.doc.resolve(n.start),d=u.nodeAfter,h=0==n.startIndex,f=n.endIndex==a.childCount,p=u.node(-1),g=u.index(-1);if(!p.canReplace(g+(h?0:1),g+1,d.content.append(f?i.Fragment.empty:i.Fragment.from(a))))return!1;var m=u.pos,v=m+d.nodeSize;return o.step(new r.b(m-(h?1:0),v+(f?1:0),m+1,v-1,new i.Slice((h?i.Fragment.empty:i.Fragment.from(a.copy(i.Fragment.empty))).append(f?i.Fragment.empty:i.Fragment.from(a.copy(i.Fragment.empty))),h?0:1,f?0:1),h?0:1)),t(o.scrollIntoView()),!0}(t,n,l)))}}function m(e){return function(t,n){var o=t.selection,a=o.$from,s=o.$to,l=a.blockRange(s,(function(t){return t.childCount&&t.firstChild.type==e}));if(!l)return!1;var c=l.startIndex;if(0==c)return!1;var u=l.parent,d=u.child(c-1);if(d.type!=e)return!1;if(n){var h=d.lastChild&&d.lastChild.type==u.type,f=i.Fragment.from(h?e.create():null),p=new i.Slice(i.Fragment.from(e.create(null,i.Fragment.from(u.type.create(null,f)))),h?3:1,0),g=l.start,m=l.end;n(t.tr.step(new r.b(g-(h?3:1),m,g,m,p,1,!0)).scrollIntoView())}return!0}}},function(e,t,n){"use strict";var r=n(169),i=n(50),o=n(51),a=n(56),s=n(57),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=l(n(351)),d=l(n(755)),h=l(n(367)),f=l(n(368)),p=l(n(756)),g=l(n(757)),m=l(n(369)),v=l(n(758)),_=l(n(366)),b=l(n(759)),y=l(n(761)),S=l(n(762)),C=l(n(763)),k=l(n(764)),E=n(127),w=n(126),O=l(n(370)),T=c(n(766)),x=l(n(100)),N=n(219);[d.default,h.default,f.default,p.default,g.default,m.default,v.default,_.default,b.default,y.default,S.default,C.default,k.default].forEach(u.default.register);var D=function(e){a(n,e);var t=s(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).handleLanguageChange=function(t){var n=e.editor.view,r=n.state.tr,i=t.target,o=i.getBoundingClientRect(),a=o.top,s=o.left,l=n.posAtCoords({top:a,left:s});if(l){var c=r.setNodeMarkup(l.inside,void 0,{language:i.value});n.dispatch(c)}},e}return o(n,[{key:"commands",value:function(e){var t=e.type;return function(){return E.setBlockType(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-\\":E.setBlockType(t)}}},{key:"handleCopyToClipboard",value:function(e){var t=this;return function(){O.default(e.textContent),t.options.onShowToast&&t.options.onShowToast(t.options.dictionary.codeCopied,N.ToastType.Info)}}},{key:"inputRules",value:function(e){var t=e.type;return[w.textblockTypeInputRule(/^```$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("```"+(t.attrs.language||"")+"\n"),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"code_block",getAttrs:function(e){return{language:e.info}}}}},{key:"languageOptions",get:function(){return Object.entries(T.LANGUAGES)}},{key:"name",get:function(){return"code_fence"}},{key:"schema",get:function(){var e=this;return{attrs:{language:{default:"javascript"}},content:"text*",marks:"",group:"block",code:!0,defining:!0,draggable:!1,parseDOM:[{tag:"pre",preserveWhitespace:"full"},{tag:".code-block",preserveWhitespace:"full",contentElement:"code",getAttrs:function(e){return{language:e.dataset.language}}}],toDOM:function(t){var n=document.createElement("button");n.innerText="Copy",n.type="button",n.addEventListener("click",e.handleCopyToClipboard(t));var i=document.createElement("select");return i.addEventListener("change",e.handleLanguageChange),e.languageOptions.forEach((function(e){var n=r(e,2),o=n[0],a=n[1],s=document.createElement("option"),l="none"===o?"":o;s.value=l,s.innerText=a,s.selected=t.attrs.language===l,i.appendChild(s)})),["div",{class:"code-block","data-language":t.attrs.language},["div",{contentEditable:!1},i,n],["pre",["code",{spellCheck:!1},0]]]}}}},{key:"plugins",get:function(){return[T.default({name:this.name,deferred:!this.options.initialReadOnly})]}},{key:"markdownToken",get:function(){return"fence"}}]),n}(x.default);t.default=D},function(e,t){e.exports=function(){for(var e={},t=0;to?i/t:o/n;return s>1?l:s*l},t.isMaxDimension=function(e){return e.clientWidth>=e.naturalWidth||e.clientHeight>=e.naturalHeight}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return"undefined"===typeof t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"===typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!==typeof d&&"function"!==typeof d)&&(d={});h-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l)};function l(n){return 40===n?e.attempt(h,t,o?t:c)(n):91===n?e.attempt(f,t,o?e.attempt(p,t,c):c)(n):o?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},t.resolveTo=function(e,t){var n,r,i,l,c,u,d,h=e.length,f=0;for(;h--;)if(l=e[h][1],c){if("link"===l.type||"labelLink"===l.type&&l._inactive)break;"enter"===e[h][0]&&"labelLink"===l.type&&(l._inactive=!0)}else if(u){if("enter"===e[h][0]&&("labelImage"===l.type||"labelLink"===l.type)&&!l._balanced&&(c=h,"labelLink"!==l.type)){f=2;break}}else"labelEnd"===l.type&&(u=h);return n={type:"labelLink"===e[c][1].type?"link":"image",start:s(e[c][1].start),end:s(e[e.length-1][1].end)},r={type:"label",start:s(e[c][1].start),end:s(e[u][1].end)},i={type:"labelText",start:s(e[c+f+2][1].end),end:s(e[u-2][1].start)},o(d=[["enter",n,t],["enter",r,t]],d.length,0,e.slice(c+1,c+f+3)),o(d,d.length,0,[["enter",i,t]]),o(d,d.length,0,a(t.parser.constructs.insideSpan.null,e.slice(c+f+4,u-3),t)),o(d,d.length,0,[["exit",i,t],e[u-2],e[u-1],["exit",r,t]]),o(d,d.length,0,e.slice(u+1)),o(d,d.length,0,[["exit",n,t]]),o(e,c,e.length,d),e},t.resolveAll=function(e){var t,n=-1;for(;++n=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=function(e){o(n,e);var t=a(n);function n(e,i){var o;return r(this,n),(o=t.call(this,e)).posTracker=null,o.onParseError=i.onParseError,o}return i(n,[{key:"_setErrorLocation",value:function(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}},{key:"_reportError",value:function(e){var t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}},{key:"_getOverriddenMethods",value:function(e){return{_err:function(t){e._reportError(t)}}}}]),n}(n(173));e.exports=s},function(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var h=0;hu);d++){var h=e.getLine(c++);i=null==i?h:i+"\n"+h}l*=2,t.lastIndex=n.ch;var f=t.exec(i);if(f){var p=i.slice(0,f.index).split("\n"),g=f[0].split("\n"),m=n.line+p.length-1,v=p[p.length-1].length;return{from:r(m,v),to:r(m+g.length-1,1==g.length?v+g[0].length:g[g.length-1].length),match:f}}}}function c(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var l=e.getLine(i),u=c(l,t,a<0?0:l.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function d(e,t,n){if(!a(t))return u(e,t,n);t=o(t,"gm");for(var i,s=1,l=e.getLine(n.line).length-n.ch,d=n.line,h=e.firstLine();d>=h;){for(var f=0;f=h;f++){var p=e.getLine(d--);i=null==i?p:p+"\n"+i}s*=2;var g=c(i,t,l);if(g){var m=i.slice(0,g.index).split("\n"),v=g[0].split("\n"),_=d+m.length,b=m[m.length-1].length;return{from:r(_,b),to:r(_+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:g}}}}function h(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function f(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,d=e.lastLine()+1-l.length;c<=d;c++,u=0){var f=e.getLine(c).slice(u),p=s(f);if(1==l.length){var g=p.indexOf(l[0]);if(-1==g)continue e;return o=h(f,p,g,s)+u,{from:r(c,h(f,p,g,s)+u),to:r(c,h(f,p,g+l[0].length,s)+u)}}var m=p.length-l[0].length;if(p.slice(m)==l[0]){for(var v=1;v=d;c--,u=-1){var f=e.getLine(c);u>-1&&(f=f.slice(0,u));var p=s(f);if(1==l.length){var g=p.lastIndexOf(l[0]);if(-1==g)continue e;return{from:r(c,h(f,p,g,s)),to:r(c,h(f,p,g+l[0].length,s))}}var m=l[l.length-1];if(p.slice(0,m.length)==m){var v=1;for(o=c-l.length+1;v0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(108))},function(e,t,n){"use strict";n.r(t),n.d(t,"Portal",(function(){return y})),n.d(t,"PortalWithState",(function(){return E}));var r=n(151),i=n.n(r),o=n(28),a=n.n(o),s=n(110),l=n.n(s),c=!("undefined"===typeof window||!window.document||!window.document.createElement),u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,n),(i=t.call(this))._onDidUpdate=i._register(new u.a),i._editor=e,i._options=h.g(o,p,!1),i.disposed=!1,i.nextIdx=-1,i.ranges=[],i.ignoreSelectionChange=!1,i.revealFirst=Boolean(i._options.alwaysRevealFirst),i._register(i._editor.onDidDispose((function(){return i.dispose()}))),i._register(i._editor.onDidUpdateDiff((function(){return i._onDiffUpdated()}))),i._options.followsCaret&&i._register(i._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){i.ignoreSelectionChange||(i.nextIdx=-1)}))),i._options.alwaysRevealFirst&&i._register(i._editor.getModifiedEditor().onDidChangeModel((function(e){i.revealFirst=!0}))),i._init(),i}return Object(i.a)(n,[{key:"_init",value:function(){this._editor.getLineChanges()}},{key:"_onDiffUpdated",value:function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}},{key:"_compute",value:function(e){var t=this;this.ranges=[],e&&e.forEach((function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((function(e){t.ranges.push({rhs:!0,range:new f.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new f.a(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort((function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0})),this._onDidUpdate.fire(this)}},{key:"_initIdx",value:function(e){var t=!1,n=this._editor.getPosition();if(n){for(var r=0,i=this.ranges.length;r=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var r=n.range.getStartPosition();this._editor.setPosition(r),this._editor.revealPositionInCenter(r,t)}finally{this.ignoreSelectionChange=!1}}}},{key:"canNavigate",value:function(){return this.ranges&&this.ranges.length>0}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._move(!0,e)}},{key:"previous",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._move(!1,e)}},{key:"dispose",value:function(){Object(o.a)(Object(a.a)(n.prototype),"dispose",this).call(this),this.ranges=[],this.disposed=!0}}]),n}(d.a)},function(e,t,n){"use strict";e.exports=n(676)},function(e,t,n){"use strict";var r=n(789),i=n(790),o=n(293),a=n(791),s=n(792),l=n(794);e.exports=function e(){var t=[],n=s(),i={},_=!1,b=-1;return y.data=function(e,t){if("string"===typeof e)return 2===arguments.length?(g("data",_),i[e]=t,y):u.call(i,e)&&i[e]||null;if(e)return g("data",_),i=e,y;return i},y.freeze=S,y.attachers=t,y.use=function(e){var n;if(g("use",_),null===e||void 0===e);else if("function"===typeof e)u.apply(null,arguments);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l(e):r(e)}n&&(i.settings=o(i.settings||{},n));return y;function r(e){l(e.plugins),e.settings&&(n=o(n||{},e.settings))}function s(e){if("function"===typeof e)u(e);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u.apply(null,e):r(e)}}function l(e){var t,n;if(null===e||void 0===e);else{if("object"!==typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(t=e.length,n=-1;++nf)&&(f=S),0!==C&&(0===p||Cg)&&(g=k)}var E=document.createElement("div");E.className="diff-review-row";var w=document.createElement("div");w.className="diff-review-cell diff-review-summary";var O=f-u+1,T=g-p+1;w.appendChild(document.createTextNode("".concat(s+1,"/").concat(this._diffs.length,": @@ -").concat(u,",").concat(O," +").concat(p,",").concat(T," @@"))),E.setAttribute("data-line",String(p));var x=function(e){return 0===e?d.a("no_lines_changed","no lines changed"):1===e?d.a("one_line_changed","1 line changed"):d.a("more_lines_changed","{0} lines changed",e)},N=x(O),D=x(T);E.setAttribute("aria-label",d.a({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}",s+1,this._diffs.length,u,N,p,D)),E.appendChild(w),E.setAttribute("role","listitem"),c.appendChild(E);for(var L=t.get(51),A=p,I=0,R=l.length;I0){var _=e[o-1];m=0===_.originalEndLineNumber?_.originalStartLineNumber+1:_.originalEndLineNumber+1,v=0===_.modifiedEndLineNumber?_.modifiedStartLineNumber+1:_.modifiedEndLineNumber+1}var b=p-3+1,y=g-3+1;if(bw){var D=w-x;x+=D,N+=D}if(N>O){var L=O-N;x+=L,N+=L}h[f++]=new j(k,x,E,N),r[i++]=new F(h)}for(var A=r[0].entries,I=[],R=0,M=1,P=r.length;Ma.modifiedStartLineNumber?d.a("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):d.a("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(function(){return oe(Object(i.a)(u),void 0,void 0,ie.a.mark((function e(){return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._clipboardService.writeText(a.originalContent.join(p)+p);case 2:case"end":return e.stop()}}),e,this)})))})));var m=0,v=void 0;a.originalEndLineNumber>a.modifiedStartLineNumber&&(v=new w.a("diff.clipboard.copyDeletedLineContent",d.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",a.originalStartLineNumber),void 0,!0,(function(){return oe(Object(i.a)(u),void 0,void 0,ie.a.mark((function e(){return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._clipboardService.writeText(a.originalContent[m]);case 2:case"end":return e.stop()}}),e,this)})))})),g.push(v)),o.getOption(72)||g.push(new w.a("diff.inline.revertChange",d.a("diff.inline.revertChange.label","Revert this change"),void 0,!0,(function(){return oe(Object(i.a)(u),void 0,void 0,ie.a.mark((function e(){var t,n;return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0===a.modifiedEndLineNumber?(t=o.getModel().getLineMaxColumn(a.modifiedStartLineNumber),o.executeEdits("diffEditor",[{range:new q.a(a.modifiedStartLineNumber,t,a.modifiedStartLineNumber,t),text:p+a.originalContent.join(p)}])):(n=o.getModel().getLineMaxColumn(a.modifiedEndLineNumber),o.executeEdits("diffEditor",[{range:new q.a(a.modifiedStartLineNumber,1,a.modifiedEndLineNumber,n),text:a.originalContent.join(p)}]));case 1:case"end":return e.stop()}}),e)})))})));var _=function(e,t){u._contextMenuService.showContextMenu({getAnchor:function(){return{x:e,y:t}},getActions:function(){return v&&(v.label=d.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",a.originalStartLineNumber+m)),g},autoSelectFirstItem:!0})};return u._register(h.addStandardDisposableListener(u._diffActions,"mousedown",(function(e){var t=h.getDomNodePagePosition(u._diffActions),n=t.top,r=t.height,i=Math.floor(f/3);e.preventDefault(),_(e.posx,n+r+i)}))),u._register(o.onMouseMove((function(e){8===e.target.type||5===e.target.type?e.target.detail.viewZoneId===u._viewZoneId?(u.visibility=!0,m=u._updateLightBulbPosition(u._marginDomNode,e.event.browserEvent.y,f)):u.visibility=!1:u.visibility=!1}))),u._register(o.onMouseDown((function(e){e.event.rightButton&&(8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===u._viewZoneId&&(e.event.preventDefault(),m=u._updateLightBulbPosition(u._marginDomNode,e.event.browserEvent.y,f),_(e.event.posx,e.event.posy+f)))}))),u}return Object(u.a)(n,[{key:"_updateLightBulbPosition",value:function(e,t,n){var r=t-h.getDomNodePagePosition(e).top,i=Math.floor(r/n),o=i*n;return this._diffActions.style.top="".concat(o,"px"),i}},{key:"visibility",get:function(){return this._visibility},set:function(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}}]),n}(v.a),se=n(129),le=n(25),ce=n(89),ue=n(272),de=n(159),he=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},fe=function(e,t){return function(n,r){t(n,r,e)}},pe=function(){function e(t,n){Object(c.a)(this,e),this._contextMenuService=t,this._clipboardService=n,this._zones=[],this.inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}return Object(u.a)(e,[{key:"getForeignViewZones",value:function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))}},{key:"clean",value:function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){for(var n=0,r=t._zones.length;n1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealLine(e,t)}},{key:"revealLineInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealLineInCenter(e,t)}},{key:"revealLineInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}},{key:"revealLineNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealLineNearTop(e,t)}},{key:"revealPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealPosition(e,t)}},{key:"revealPositionInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealPositionInCenter(e,t)}},{key:"revealPositionInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}},{key:"revealPositionNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealPositionNearTop(e,t)}},{key:"getSelection",value:function(){return this.modifiedEditor.getSelection()}},{key:"getSelections",value:function(){return this.modifiedEditor.getSelections()}},{key:"setSelection",value:function(e){this.modifiedEditor.setSelection(e)}},{key:"setSelections",value:function(e){this.modifiedEditor.setSelections(e)}},{key:"revealLines",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.modifiedEditor.revealLines(e,t,n)}},{key:"revealLinesInCenter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.modifiedEditor.revealLinesInCenter(e,t,n)}},{key:"revealLinesInCenterIfOutsideViewport",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}},{key:"revealLinesNearTop",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.modifiedEditor.revealLinesNearTop(e,t,n)}},{key:"revealRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.modifiedEditor.revealRange(e,t,n,r)}},{key:"revealRangeInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealRangeInCenter(e,t)}},{key:"revealRangeInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}},{key:"revealRangeNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealRangeNearTop(e,t)}},{key:"revealRangeNearTopIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}},{key:"revealRangeAtTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.modifiedEditor.revealRangeAtTop(e,t)}},{key:"getSupportedActions",value:function(){return this.modifiedEditor.getSupportedActions()}},{key:"saveViewState",value:function(){return{original:this.originalEditor.saveViewState(),modified:this.modifiedEditor.saveViewState()}}},{key:"restoreViewState",value:function(e){if(e.original&&e.modified){var t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}}},{key:"layout",value:function(e){this._elementSizeObserver.observe(e)}},{key:"focus",value:function(){this.modifiedEditor.focus()}},{key:"hasTextFocus",value:function(){return this.originalEditor.hasTextFocus()||this.modifiedEditor.hasTextFocus()}},{key:"trigger",value:function(e,t,n){this.modifiedEditor.trigger(e,t,n)}},{key:"changeDecorations",value:function(e){return this.modifiedEditor.changeDecorations(e)}},{key:"_onDidContainerSizeChanged",value:function(){this._doLayout()}},{key:"_getReviewHeight",value:function(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}},{key:"_layoutOverviewRulers",value:function(){if(this._originalOverviewRuler&&this._modifiedOverviewRuler){var e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),r=n.ENTIRE_DIFF_OVERVIEW_WIDTH-2*n.ONE_OVERVIEW_WIDTH;this.modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:n.ONE_OVERVIEW_WIDTH,right:r+n.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:n.ONE_OVERVIEW_WIDTH,height:e-t}))}}},{key:"_onViewZonesChanged",value:function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}},{key:"_beginUpdateDecorationsSoon",value:function(){var e=this;-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((function(){return e._beginUpdateDecorations()}),n.UPDATE_DIFF_DECORATIONS_DELAY)}},{key:"_beginUpdateDecorations",value:function(){var e=this;this._beginUpdateDecorationsTimeout=-1;var t=this.originalEditor.getModel(),r=this.modifiedEditor.getModel();if(t&&r){this._diffComputationToken++;var i=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,r.uri)?this._editorWorkerService.computeDiff(t.uri,r.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((function(n){i===e._diffComputationToken&&t===e.originalEditor.getModel()&&r===e.modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=n,e._updateDecorationsRunner.schedule(),e._onDidUpdateDiff.fire())}),(function(n){i===e._diffComputationToken&&t===e.originalEditor.getModel()&&r===e.modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=null,e._updateDecorationsRunner.schedule())})):n._equals(t.uri,this._lastOriginalWarning)&&n._equals(r.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=r.uri,this._notificationService.warn(d.a("diff.tooLarge","Cannot compare files because one file is too large.")))}}},{key:"_cleanViewZonesAndDecorations",value:function(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)}},{key:"_updateDecorations",value:function(){if(this.originalEditor.getModel()&&this.modifiedEditor.getModel()&&this._originalOverviewRuler&&this._modifiedOverviewRuler){var e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),r=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,r.original,!1),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,r.modified,!0)}finally{this._currentlyChangingViewZones=!1}}}},{key:"_adjustOptionsForSubEditor",value:function(e){var t=_.c(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}},{key:"_adjustOptionsForLeftHandSide",value:function(e,t,n){var r=this._adjustOptionsForSubEditor(e);return n&&(r.codeLens=!0),r.readOnly=!t,r.extraEditorClassName="original-in-monaco-diff-editor",r}},{key:"_adjustOptionsForRightHandSide",value:function(e,t){var r=this._adjustOptionsForSubEditor(e);return t&&(r.codeLens=!0),r.revealHorizontalRightPadding=T.g.revealHorizontalRightPadding.defaultValue+n.ENTIRE_DIFF_OVERVIEW_WIDTH,r.scrollbar.verticalHasArrows=!1,r.extraEditorClassName="modified-in-monaco-diff-editor",r}},{key:"doLayout",value:function(){this._elementSizeObserver.observe(),this._doLayout()}},{key:"_doLayout",value:function(){var e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),r=this._getReviewHeight(),i=this._strategy.layout();this._originalDomNode.style.width=i+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-i+"px",this._modifiedDomNode.style.left=i+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-r+"px",this._overviewDomElement.style.width=n.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-n.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(n.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this.originalEditor.layout({width:i,height:t-r}),this.modifiedEditor.layout({width:e-i-n.ENTIRE_DIFF_OVERVIEW_WIDTH,height:t-r}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-r,e,r),this._layoutOverviewViewport()}},{key:"_layoutOverviewViewport",value:function(){var e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}},{key:"_computeOverviewViewport",value:function(){var e=this.modifiedEditor.getLayoutInfo();if(!e)return null;var t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),r=Math.max(0,e.height),i=Math.max(0,r-0),o=n>0?i/n:0;return{height:Math.max(0,Math.floor(e.height*o)),top:Math.floor(t*o)}}},{key:"_createDataSource",value:function(){var e=this;return{getWidth:function(){return e._elementSizeObserver.getWidth()},getHeight:function(){return e._elementSizeObserver.getHeight()-e._getReviewHeight()},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}}},{key:"_setStrategy",value:function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}},{key:"_getLineChangeAtOrBeforeLineNumber",value:function(e,t){var n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=s?r=o+1:(r=o,i=o)}return n[r]}},{key:"_getEquivalentLineForOriginalLineNumber",value:function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=i?r+Math.min(a,o):r+o-i+a}},{key:"_getEquivalentLineForModifiedLineNumber",value:function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-r;return a<=o?n+Math.min(a,i):n+i-o+a}},{key:"getDiffLineInformationForOriginal",value:function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}},{key:"getDiffLineInformationForModified",value:function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}}],[{key:"_getClassName",value:function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=Object(M.f)(e.type)}},{key:"_equals",value:function(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}}]),n}(v.a);_e.ONE_OVERVIEW_WIDTH=15,_e.ENTIRE_DIFF_OVERVIEW_WIDTH=30,_e.UPDATE_DIFF_DECORATIONS_DELAY=200,_e=he([fe(2,se.a),fe(3,Q.a),fe(4,I.b),fe(5,J.a),fe(6,S.a),fe(7,M.c),fe(8,te.a),fe(9,ne.a),fe(10,ce.a)],_e);var be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this))._dataSource=e,r._insertColor=null,r._removeColor=null,r}return Object(u.a)(n,[{key:"applyColors",value:function(e){var t=(e.getColor(R.n)||R.j).transparent(2),n=(e.getColor(R.p)||R.k).transparent(2),r=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,r}},{key:"getEditorsDiffDecorations",value:function(e,t,n,r,i,o,a){i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),r=r.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var s=this._getViewZones(e,r,i,o,a,n),l=this._getOriginalEditorDecorations(e,t,n,o,a),c=this._getModifiedEditorDecorations(e,t,n,o,a);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:s.original},modified:{decorations:c.decorations,overviewZones:c.overviewZones,zones:s.modified}}}}]),n}(v.a),ye=function(){function e(t){Object(c.a)(this,e),this._source=t,this._index=-1,this.current=null,this.advance()}return Object(u.a)(e,[{key:"advance",value:function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},d=new ye(this.modifiedForeignVZ),h=new ye(this.originalForeignVZ),f=0,p=this.lineChanges.length;f<=p;f++){var g=f0?-1:0),a=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),i=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,r=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,s=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),l=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(s=o+=1e7+i,l=a+=1e7+r);for(var m=[],v=[];d.current&&d.current.afterLineNumber<=l;){var _=void 0;_=d.current.afterLineNumber<=a?o-a+d.current.afterLineNumber:s;var b=null;g&&g.modifiedStartLineNumber<=d.current.afterLineNumber&&d.current.afterLineNumber<=g.modifiedEndLineNumber&&(b=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),m.push({afterLineNumber:_,heightInLines:d.current.height/this.modifiedLineHeight,domNode:null,marginDomNode:b}),d.advance()}for(;h.current&&h.current.afterLineNumber<=s;){var y=void 0;y=h.current.afterLineNumber<=o?a-o+h.current.afterLineNumber:l,v.push({afterLineNumber:y,heightInLines:h.current.height/this.originalLineHeight,domNode:null}),h.advance()}if(null!==g&&xe(g)){var S=this._produceOriginalFromDiff(g,i,r);S&&m.push(S)}if(null!==g&&Ne(g)){var C=this._produceModifiedFromDiff(g,i,r);C&&v.push(C)}var k=0,E=0;for(m=m.sort(c),v=v.sort(c);k=O.heightInLines?(w.heightInLines-=O.heightInLines,E++):(O.heightInLines-=w.heightInLines,k++)}for(;k0&&void 0!==arguments[0]?arguments[0]:this._sashRatio,t=this._dataSource.getWidth(),r=t-_e.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.floor((e||.5)*r),o=Math.floor(.5*r);return i=this._disableSash?o:i||o,r>2*n.MINIMUM_EDITOR_WIDTH?(ir-n.MINIMUM_EDITOR_WIDTH&&(i=r-n.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}},{key:"onSashDragStart",value:function(){this._startSashPosition=this._sashPosition}},{key:"onSashDrag",value:function(e){var t=this._dataSource.getWidth()-_e.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()}},{key:"onSashDragEnd",value:function(){this._sash.layout()}},{key:"onSashReset",value:function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}},{key:"getVerticalSashTop",value:function(e){return 0}},{key:"getVerticalSashLeft",value:function(e){return this._sashPosition}},{key:"getVerticalSashHeight",value:function(e){return this._dataSource.getHeight()}},{key:"_getViewZones",value:function(e,t,n,r,i){return new we(e,t,r.getOption(51),n,i.getOption(51)).getViewZones()}},{key:"_getOriginalEditorDecorations",value:function(e,t,n,r,i){for(var o=String(this._removeColor),a={decorations:[],overviewZones:[]},s=r.getModel(),l=0,c=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}},{key:"_produceModifiedFromDiff",value:function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}]),n}(Se),Oe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r){var i;return Object(c.a)(this,n),(i=t.call(this,e)).decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(e.getOriginalEditor().onDidLayoutChange((function(t){i.decorationsLeft!==t.decorationsLeft&&(i.decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))),i}return Object(u.a)(n,[{key:"setEnableSplitViewResizing",value:function(e){}},{key:"_getViewZones",value:function(e,t,n,r,i,o){return new Te(e,t,n,r,i,o).getViewZones()}},{key:"_getOriginalEditorDecorations",value:function(e,t,n,r,i){for(var o=String(this._removeColor),a={decorations:[],overviewZones:[]},s=0,l=e.length;s')])}p+=this.modifiedEditorOptions.get(85);var _=document.createElement("div");_.className="view-lines line-delete ".concat(de.a),_.innerHTML=s.build(),b.a.applyFontInfoSlow(_,u);var y=document.createElement("div");return y.className="inline-deleted-margin-view-zone",y.innerHTML=l.join(""),b.a.applyFontInfoSlow(y,u),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:p*f,domNode:_,marginDomNode:y,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalContent:g}}}},{key:"_renderOriginalLine",value:function(e,t,n,r,i,o,a){var s=t.getLineTokens(i),l=s.getLineContent(),c=n.get(36),u=X.a.filter(o,i,1,l.length+1);a.appendASCIIString('
');var d=A.d.isBasicASCII(l,t.mightContainNonBasicASCII()),h=A.d.containsRTL(l,d,t.mightContainRTL()),f=Object(L.d)(new L.c(c.isMonospace&&!n.get(24),c.canUseHalfwidthRightwardsArrow,l,!1,d,h,0,s,u,r,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,n.get(95),n.get(80),n.get(74),n.get(37)!==T.e.OFF,null),a);a.appendASCIIString("
");var p=f.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0}}]),n}(Se);function xe(e){return e.modifiedEndLineNumber>0}function Ne(e){return e.originalEndLineNumber>0}Object(M.g)((function(e,t){var n=e.getColor(R.n);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ".concat(n,"; }")),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: ".concat(n,"; }")));var r=e.getColor(R.p);r&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ".concat(r,"; }")),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ".concat(r,"; }")),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: ".concat(r,"; }")));var i=e.getColor(R.o);i&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(i,"; }"));var o=e.getColor(R.q);o&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(o,"; }"));var a=e.getColor(R.ic);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ".concat(a,"; }"));var s=e.getColor(R.l);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ".concat(s,"; }"));var l=e.getColor(R.kc);l&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ".concat(l,";\n\t\t\t}\n\t\t"));var c=e.getColor(R.lc);c&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ".concat(c,";\n\t\t\t}\n\t\t"));var u=e.getColor(R.jc);u&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ".concat(u,";\n\t\t\t}\n\t\t"));var d=e.getColor(R.m);t.addRule("\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t".concat(d," 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t").concat(d," 50%, ").concat(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"))}))},function(e,t,n){var r=n(14);e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:90;return e.length<=t?e:e.substring(0,t)+"..."}},{key:"sleep",value:function(e){return new Promise((function(t,n){setTimeout((function(){t()}),1e3*e)}))}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"EditorKit",(function(){return c}));var i=n(2),o=n(8);function a(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){a(o,r,i,s,l,"next",e)}function l(e){a(o,r,i,s,l,"throw",e)}s(void 0)}))}}function l(e,t){for(var n=0;n0){var n=!1,r=!0,i=!1,o=void 0;try{for(var a,s=function(){var r=a.value,i=t.find((function(e){return e.uuid==r}));if(!i)return"continue";n=!0,e.fileIdsPendingAssociation.splice(e.fileIdsPendingAssociation.indexOf(r),1);var o=c.a.insertionSyntaxForFileDescriptor(i);e.delegate.insertRawText(o)},l=e.fileIdsPendingAssociation.slice()[Symbol.iterator]();!(r=(a=l.next()).done);r=!0)s()}catch(u){i=!0,o=u}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}n&&e.textExpander.searchPatterns()}t.length>0&&e.fileLoader.loadFilesafeElements()})),this.filesafe.addNewFileDescriptorHandler((function(t){e.fileIdsPendingAssociation.push(t.uuid)})),this.fileLoader=new s.a({filesafe:this.filesafe,getElementsBySelector:this.delegate.getElementsBySelector,insertElement:this.delegate.insertElement,preprocessElement:this.delegate.preprocessElement}),this.textExpander=new l.a({afterExpand:function(){e.fileLoader.loadFilesafeElements()},getCurrentLineText:this.delegate.getCurrentLineText,getPreviousLineText:this.delegate.getPreviousLineText,replaceText:this.delegate.replaceText,patterns:[{regex:c.a.FilesafeSyntaxPattern,callback:function(e){return c.a.expandedFilesafeSyntax(e)}}]})}},{key:"connectToBridge",value:function(){var e=this;this.componentManager=new o.a(null,(function(){document.documentElement.classList.add(e.componentManager.platform)})),this.componentManager.coallesedSavingDelay=this.coallesedSavingDelay,this.componentManager.streamContextItem((function(t){var n=!0;if(e.note&&e.note.uuid==t.uuid&&(n=!1),e.supportsFilesafe){var r=e.FilesafeClass.getSFItemClass();e.note=new r(t),e.filesafe.setCurrentNote(e.note)}else e.note=t;if(!t.isMetadataUpdate){var i=t.content.text;"html"==e.mode&&n&&(/<[a-z][\s\S]*>/i.test(i)||(e.ignoreNextTextChange=!0)),e.previousText=i,e.supportsFilesafe&&(e.needsFilesafeElementLoad=!0,i=c.a.expandedFilesafeSyntax(i)),e.delegate.setEditorRawText(i),n&&e.delegate.clearUndoHistory()}}))}},{key:"onEditorKeyUp",value:function(e){var t=e.key,n=e.isSpace,r=e.isEnter;this.textExpander.onKeyUp({key:t,isSpace:n,isEnter:r})}},{key:"onEditorPaste",value:function(){this.textExpander.onKeyUp({isPaste:!0})}},{key:"onEditorValueChanged",value:function(e){var t=this;if(this.needsFilesafeElementLoad&&(this.needsFilesafeElementLoad=!1,this.fileLoader.loadFilesafeElements()),this.ignoreNextTextChange)this.ignoreNextTextChange=!1;else{if(this.supportsFilesafe&&(e=c.a.collapseFilesafeSyntax(e),this.previousText==e))return;this.previousText=e;var n=this.note;n&&this.componentManager.saveItemWithPresave(n,(function(){if(n.content.text=e,t.delegate.generateCustomPreview){var r=t.delegate.generateCustomPreview(e);r.html&&(n.content.preview_html=r.html),r.plain&&(n.content.preview_plain=r.plain)}else{if("html"==t.mode){var i=c.a.removeFilesafeSyntaxFromHtml(e);i=a.a.truncateString(a.a.htmlToText(i)),n.content.preview_plain=i.length>0?i:" "}else n.content.preview_plain=e;n.content.preview_html=null}}))}}},{key:"canUploadFiles",value:function(){var e=this.filesafe.getAllCredentials(),t=this.filesafe.getAllIntegrations();return e.length>0&&t.length>0}},{key:"uploadJSFileObject",value:function(){var e=d(r.mark((function e(t){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.fileLoader.insertStatusAtCursor("Processing file..."),e.abrupt("return",this.filesafe.encryptAndUploadJavaScriptFileObject(t).then((function(e){i.fileLoader.removeCursorStatus(n)})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}])&&h(t.prototype,i),u&&h(t,u),e}()},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&this.requestPermissions(this.initialPermissions);var t=!0,n=!1,r=void 0;try{for(var i,o=this.messageQueue[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;this.postMessage(a.action,a.data,a.callback)}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}this.messageQueue=[],this.loggingEnabled&&console.log("onReadyData",e),this.activateThemes(e.activeThemeUrls||[]),this.onReadyCallback&&this.onReadyCallback()}},{key:"getSelfComponentUUID",value:function(){return this.uuid}},{key:"isRunningInDesktopApplication",value:function(){return"desktop"===this.environment}},{key:"setComponentDataValueForKey",value:function(e,t){this.componentData[e]=t,this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"clearComponentData",value:function(){this.componentData={},this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"componentDataValueForKey",value:function(e){return this.componentData[e]}},{key:"postMessage",value:function(e,t,n){if(this.sessionKey){var r={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.sessionKey,api:"component"},i=JSON.parse(JSON.stringify(r));i.callback=n,this.sentMessages.push(i),this.isMobile&&(r=JSON.stringify(r)),this.loggingEnabled&&console.log("Posting message:",r),window.parent.postMessage(r,this.origin)}else this.messageQueue.push({action:e,data:t,callback:n})}},{key:"setSize",value:function(e,t,n){this.postMessage("set-size",{type:e,width:t,height:n},(function(e){}))}},{key:"requestPermissions",value:function(e,t){this.postMessage("request-permissions",{permissions:e},function(e){t&&t()}.bind(this))}},{key:"streamItems",value:function(e,t){Array.isArray(e)||(e=[e]),this.postMessage("stream-items",{content_types:e},function(e){t(e.items)}.bind(this))}},{key:"streamContextItem",value:function(e){var t=this;this.postMessage("stream-context-item",null,(function(n){var r=n.item;(!t.lastStreamedItem||t.lastStreamedItem.uuid!==r.uuid)&&t.pendingSaveTimeout&&(clearTimeout(t.pendingSaveTimeout),t._performSavingOfItems(t.pendingSaveParams),t.pendingSaveTimeout=null,t.pendingSaveParams=null),t.lastStreamedItem=r,e(t.lastStreamedItem)}))}},{key:"selectItem",value:function(e){this.postMessage("select-item",{item:this.jsonObjectForItem(e)})}},{key:"createItem",value:function(e,t){this.postMessage("create-item",{item:this.jsonObjectForItem(e)},function(e){var n=e.item;!n&&e.items&&e.items.length>0&&(n=e.items[0]),this.associateItem(n),t&&t(n)}.bind(this))}},{key:"createItems",value:function(e,t){var n=this,r=e.map((function(e){return n.jsonObjectForItem(e)}));this.postMessage("create-items",{items:r},function(e){t&&t(e.items)}.bind(this))}},{key:"associateItem",value:function(e){this.postMessage("associate-item",{item:this.jsonObjectForItem(e)})}},{key:"deassociateItem",value:function(e){this.postMessage("deassociate-item",{item:this.jsonObjectForItem(e)})}},{key:"clearSelection",value:function(){this.postMessage("clear-selection",{content_type:"Tag"})}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){var n={items:e.map(function(e){return this.jsonObjectForItem(e)}.bind(this))};this.postMessage("delete-items",n,(function(e){t&&t(e)}))}},{key:"sendCustomEvent",value:function(e,t,n){this.postMessage(e,t,function(e){n&&n(e)}.bind(this))}},{key:"saveItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}},{key:"saveItemWithPresave",value:function(e,t,n){this.saveItemsWithPresave([e],t,n)}},{key:"saveItemsWithPresave",value:function(e,t,n){this.saveItems(e,n,!1,t)}},{key:"_performSavingOfItems",value:function(e){var t=e.items,n=e.presave,r=e.callback;n&&n();var i=[],o=!0,a=!1,s=void 0;try{for(var l,c=t[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value;i.push(this.jsonObjectForItem(u))}}catch(d){a=!0,s=d}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}this.postMessage("save-items",{items:i},(function(e){r&&r()}))}},{key:"saveItems",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments[3];if(this.pendingSaveItems||(this.pendingSaveItems=[]),1!=this.coallesedSaving||r)this._performSavingOfItems({items:e,presave:i,callback:t});else{this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);var o=e.map((function(e){return e.uuid})),a=this.pendingSaveItems.filter((function(e){return!o.includes(e.uuid)}));this.pendingSaveItems=a.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:i,callback:t},this.pendingSaveTimeout=setTimeout((function(){n._performSavingOfItems(n.pendingSaveParams),n.pendingSaveItems=[],n.pendingSaveTimeout=null,n.pendingSaveParams=null}),this.coallesedSavingDelay)}}},{key:"jsonObjectForItem",value:function(e){var t=Object.assign({},e);return t.children=null,t.parent=null,t}},{key:"getItemAppDataValue",value:function(e,t){var n=e.content.appData&&e.content.appData["org.standardnotes.sn"];return n?n[t]:null}},{key:"activateThemes",value:function(e){if(this.loggingEnabled&&console.log("Incoming themes",e),this.activeThemes.sort().toString()!=e.sort().toString()){var t=e||[],n=[],r=!0,i=!1,o=void 0;try{for(var a,s=this.activeThemes[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;e.includes(l)?t=t.filter((function(e){return e!=l})):n.push(l)}}catch(C){i=!0,o=C}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}this.loggingEnabled&&(console.log("Deactivating themes:",n),console.log("Activating themes:",t));var c=!0,u=!1,d=void 0;try{for(var h,f=n[Symbol.iterator]();!(c=(h=f.next()).done);c=!0){var p=h.value;this.deactivateTheme(p)}}catch(C){u=!0,d=C}finally{try{!c&&f.return&&f.return()}finally{if(u)throw d}}this.activeThemes=e;var g=!0,m=!1,v=void 0;try{for(var _,b=t[Symbol.iterator]();!(g=(_=b.next()).done);g=!0){var y=_.value;if(y){var S=document.createElement("link");S.id=btoa(y),S.href=y,S.type="text/css",S.rel="stylesheet",S.media="screen,print",S.className="custom-theme",document.getElementsByTagName("head")[0].appendChild(S)}}}catch(C){m=!0,v=C}finally{try{!g&&b.return&&b.return()}finally{if(m)throw v}}}}},{key:"themeElementForUrl",value:function(e){return Array.from(document.getElementsByClassName("custom-theme")).slice().find((function(t){return t.id==btoa(e)}))}},{key:"deactivateTheme",value:function(e){var t=this.themeElementForUrl(e);t&&(t.disabled=!0,t.parentNode.removeChild(t))}},{key:"generateUUID",value:function(){var e=window.crypto||window.msCrypto;if(e){var t=new Uint32Array(4);e.getRandomValues(t);var n=-1;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){n++;var r=t[n>>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return window.performance&&"function"===typeof window.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}}]),e}();"undefined"!=typeof e&&"undefined"!=typeof e.exports&&(e.exports=i),window&&(window.ComponentManager=i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(0);function o(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function a(e,t){for(var n=0;n0)){e.next=17;break}return e.abrupt("return",{success:!1});case 17:return u=function(){g.currentlyLoadingIds.splice(g.currentlyLoadingIds.indexOf(n),1)},this.currentlyLoadingIds.push(n),this.setStatus("Downloading ".concat(a,"..."),t,n,o),e.next=22,i.a.sleep(.05);case 22:return e.next=24,this.filesafe.downloadFileFromDescriptor(l).catch((function(e){g.setStatus("Unable to download ".concat(a," ").concat(n,"."),t,n,o)}));case 24:if(d=e.sent){e.next=27;break}return e.abrupt("return");case 27:return this.setStatus("Decrypting ".concat(a,"..."),t,n,o),e.next=30,i.a.sleep(.05);case 30:return e.next=32,this.filesafe.decryptFile({fileDescriptor:l,fileItem:d}).catch((function(e){g.setStatus("Unable to decrypt ".concat(a," ").concat(n,"."),t,n,o)}));case 32:if(h=e.sent){e.next=35;break}return e.abrupt("return");case 35:return this.setStatus(null,t,n),e.next=38,i.a.sleep(.05);case 38:return f=l.content.fileType,p=this.filesafe.createTemporaryFileUrl({base64Data:h.decryptedData,dataType:f}),this.insertMediaElement({url:p,fsid:n,fileType:f,fsname:o,fsElement:t}),u(),this.uuidToFileTempUrlAndTypeMapping[n]={url:p,fileType:f,fsname:o},e.abrupt("return",{success:!0});case 44:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}()},{key:"insertMediaElement",value:function(e){var t,n=e.url,r=e.fsid,i=e.fsname,o=e.fileType,a=e.fsElement,s=this.fileTypeForElementType(o);return t="img"==s?this.createImageElement({url:n,fsid:r,fsname:i,fsElement:a}):"video"==s?this.createVideoElement({url:n,fsid:r,fileType:o,fsname:i,fsElement:a}):"audio"==s?this.createAudioElement({url:n,fsid:r,fsname:i}):this.createDownloadElement({url:n,fsid:r,fileType:o,fsname:i,fsElement:a}),this.insertElementNearElement(t,a),a.remove(),!0}},{key:"wrapElementInTag",value:function(e){var t=e.element,n=e.tagName,r=e.fsid,i=e.fsname,o=document.createElement(n);return o.setAttribute("fsid",r),o.setAttribute("fsname",i),o.setAttribute("fscollapsable",!0),o.setAttribute("contenteditable",!0),o.append(t),o}},{key:"basicwrapElementInTag",value:function(e,t){var n=document.createElement(t);return n.append(e),n}},{key:"createImageElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsname,i=e.fsElement,o=document.createElement("img");return o.setAttribute("src",t),o.setAttribute("srcset","".concat(t," 2x")),o.setAttribute("fsid",n),o.setAttribute("fsname",r),o.setAttribute("fscollapsable",!0),i.getAttribute("width")&&(o.setAttribute("width",i.getAttribute("width")),o.setAttribute("height",i.getAttribute("height"))),o}},{key:"createVideoElement",value:function(e){var t=e.url,n=e.fsid,r=e.fileType,i=e.fsname,o=e.fsElement,a=document.createElement("video");a.setAttribute("controls",!0),a.setAttribute("fsid",n),a.setAttribute("fsname",i),a.setAttribute("fscollapsable",!0),o.getAttribute("width")&&(a.setAttribute("width",o.getAttribute("width")),a.setAttribute("height",o.getAttribute("height")));var s=document.createElement("source");return s.setAttribute("src",t),s.setAttribute("type",r),a.append(s),this.wrapElementInTag({element:a,tagName:"p",fsid:n,fsname:i})}},{key:"createDownloadElement",value:function(e){var t=e.url,n=e.fsid,r=(e.fileType,e.fsname),i=(e.fsElement,document.createElement("a"));return i.setAttribute("fsid",n),i.setAttribute("fsname",r),i.setAttribute("ghost","true"),i.setAttribute("fscollapsable",!0),i.setAttribute("href",t),i.textContent="".concat(r),i}},{key:"createAudioElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsname,i=document.createElement("audio");return i.setAttribute("src",t),i.setAttribute("controls",!0),i.setAttribute("fsid",n),i.setAttribute("fsname",r),i.setAttribute("fscollapsable",!0),this.wrapElementInTag({element:i,tagName:"p",fsid:n,fsname:r})}},{key:"setStatus",value:function(e,t,n,r,i){if(n){var o=this.statusElementMapping[n];o&&(o.remove(),delete this.statusElementMapping[n])}if(e){var a=document.createElement("label");return a.setAttribute("id",n),a.setAttribute("ghost","true"),a.setAttribute("contenteditable",!1),a.style.fontWeight="bold",a.textContent=e,i&&(a.style.userSelect="all"),a=this.insertElementNearElement(a,t),n&&(this.statusElementMapping[n]=a),a}}},{key:"insertStatusAtCursor",value:function(e){var t=Math.random().toString(36).substring(7);return this.setStatus(e,null,t),t}},{key:"removeCursorStatus",value:function(e){var t=this.getElementsBySelector("#".concat(e));t.length>0&&t[0].remove()}},{key:"insertElementNearElement",value:function(e,t){var n=this.preprocessElement(e),r="child";if("figure"==n.tagName.toLowerCase()){var i=t.closest("p");i&&(t=i,r="afterend")}return this.insertElement(n,t,r),n}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.searchPreviousLine;e=n?this.getPreviousLineText():this.getCurrentLineText();var r=!0,i=!1,o=void 0;try{for(var a,s=this.patterns[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value,c=l.regex.exec(e);if(c){var u=c[0];if(u){var d=l.callback(u);this.replaceSelection(l.regex,d,n)}}}}catch(h){i=!0,o=h}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}},{key:"replaceSelection",value:function(e,t,n){this.beforeExpand&&this.beforeExpand(),this.replaceText({regex:e,replacement:t,previousLine:n}),this.afterExpand&&this.afterExpand()}}])&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n","")).replace("

","")).replace("[","").replace("]","")).split(":"),n=t[1],r=t[2],i=t[3],o="";if(i){var a=i.split("x");o="width=".concat(a[0]," height=").concat(a[1])}return"

")}},{key:"collapseFilesafeSyntax",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html"),n=t.querySelectorAll("*[fscollapsable]"),r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value,c=l.getAttribute("fsid"),u=l.getAttribute("fsname"),d=l.getAttribute("width"),h=l.getAttribute("height"),f=["FileSafe",c,u];if(d||h){var p="".concat(d,"x").concat(h);f.push(p)}var g="

[".concat(f.join(":"),"]

");l.insertAdjacentHTML("afterend",g),l.remove()}}catch(m){i=!0,o=m}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return t.querySelectorAll("*[ghost]").forEach((function(e){e.remove()})),t.body.innerHTML}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}();a=/(

)?\[FileSafe[^\]]*\](<\/p>)?/g,(o="FilesafeSyntaxPattern")in(i=s)?Object.defineProperty(i,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[o]=a},function(e,t){e.exports=n(444)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n=t.insertRawText,r=t.onReceiveNote,i=t.setEditorRawText,o=t.getCurrentLineText,a=t.getPreviousLineText,s=t.replaceText,l=t.getElementsBySelector,c=t.insertElement,u=t.preprocessElement,d=t.clearUndoHistory,h=t.generateCustomPreview;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.insertRawText=n,this.onReceiveNote=r,this.setEditorRawText=i,this.getCurrentLineText=o,this.getPreviousLineText=a,this.replaceText=s,this.getElementsBySelector=l,this.insertElement=c,this.preprocessElement=u,this.clearUndoHistory=d,this.generateCustomPreview=h}}])},function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function o(e,t){return e(t={exports:{}},t.exports),t.exports}var a=o((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=(a.defaults,a.getDefaults,a.changeDefaults,/[&<>"']/),l=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return d[e]};function f(e,t){if(t){if(s.test(e))return e.replace(l,h)}else if(c.test(e))return e.replace(u,h);return e}var p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(p,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function v(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var _=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(_,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=w(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}var S={},C=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(e,t){S[" "+e]||(C.test(e)?S[" "+e]=e+"/":S[" "+e]=x(e,"/",!0));var n=-1===(e=S[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(E,"$1")+t:e+t}function O(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length=r.length?e.slice(r.length):e})).join("\n")}var B=function(){function e(e){this.options=e||A}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=F(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],d=u.length>1,h=")"===u[u.length-1],f={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),g=!1,m=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=m-1)),a=g||/\n\n(?!\s*$)/.test(n),v!==m-1&&(g="\n"===n.charAt(n.length-1),a||(a=g)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):M(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=P(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return j(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?t(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),U=L.noopTest,H=L.edit,z=L.merge,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:U,table:U,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};V.def=H(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=H(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=H(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=/|$)/,V.html=H(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=H(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=H(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=z({},V),V.gfm=z({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=H(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=H(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=z({},V.normal,{html:H("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:U,paragraph:H(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:U,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:U,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};W.punctuation=H(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",W._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",W._comment=H(V._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.em.start=H(W.em.start).replace(/punctuation/g,W._punctuation).getRegex(),W.em.middle=H(W.em.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.em.endAst=H(W.em.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.em.endUnd=H(W.em.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.start=H(W.strong.start).replace(/punctuation/g,W._punctuation).getRegex(),W.strong.middle=H(W.strong.middle).replace(/punctuation/g,W._punctuation).replace(/blockSkip/g,W._blockSkip).getRegex(),W.strong.endAst=H(W.strong.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.endUnd=H(W.strong.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=H(W._blockSkip,"g").getRegex(),W.overlapSkip=H(W._overlapSkip,"g").getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,W.autolink=H(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=H(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=H(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=H(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=H(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=z({},W),W.pedantic=z({},W.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=z({},W.normal,{escape:H(W.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Z=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||q,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:K.normal,inline:Y.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=Y.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=Y.breaks:t.inline=Y.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,Q))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,Q))){if(o=this.tokenizer.inlineText(e,r,$))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},t(e,null,[{key:"rules",get:function(){return{block:K,inline:Y}}}]),e}(),X=a.defaults,J=L.cleanUrl,ee=L.escape,te=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'

'+(n?e:ee(e,!0))+"
\n":"
"+(n?e:ee(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ne=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),re=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ie=a.defaults,oe=L.unescape,ae=function(){function e(e){this.options=e||ie,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ne,this.slugger=new re}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y="",S=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,p),u+=this.renderer.listitem(g,_,v);y+=this.renderer.list(u,h,f);continue;case"html":y+=this.renderer.html(d.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1An error occurred:

    "+ce(l.message+"",!0)+"
    ";throw l}}return fe.options=fe.setOptions=function(e){return se(fe.defaults,e),de(fe.defaults),fe},fe.getDefaults=ue,fe.defaults=he,fe.use=function(e){var t=se({},e);if(e.renderer&&function(){var n=fe.defaults.renderer||new te,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;c--)if(u[c]!==d[c])return!1;for(c=u.length-1;c>=0;c--)if(!b(e[s=u[c]],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function S(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function C(e,t,n,r){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&v(i,n,"Missing expected exception"+r);var o="string"===typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&S(i,n)||s)&&v(i,n,"Got unwanted exception"+r),e&&i&&n&&!S(i,n)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=v,h.ok=_,h.equal=function(e,t,n){e!=t&&v(e,t,n,"==",h.equal)},h.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",h.notEqual)},h.deepEqual=function(e,t,n){b(e,t,!1)||v(e,t,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,n){b(e,t,!0)||v(e,t,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,n){b(e,t,!1)&&v(e,t,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",h.strictEqual)},h.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",h.notStrictEqual)},h.throws=function(e,t,n){C(!0,e,t,n)},h.doesNotThrow=function(e,t,n){C(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,n){t||v(t,!0,n,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var k=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(161))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(149),i=n(169);function o(){var e=r(["\n will-change: opacity, transform;\n padding: 8px 16px;\n position: absolute;\n z-index: ",";\n opacity: 0;\n background-color: ",';\n border-radius: 4px;\n transform: scale(0.95);\n transition: opacity 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n transition-delay: 150ms;\n line-height: 0;\n height: 40px;\n box-sizing: border-box;\n pointer-events: none;\n white-space: nowrap;\n\n &::before {\n content: "";\n display: block;\n width: 24px;\n height: 24px;\n transform: translateX(-50%) rotate(45deg);\n background: ',";\n border-radius: 3px;\n z-index: -1;\n position: absolute;\n bottom: -2px;\n left: calc(50% - ","px);\n }\n\n * {\n box-sizing: border-box;\n }\n\n ",";\n\n @media print {\n display: none;\n }\n"]);return o=function(){return e},e}var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(653)),c=s(n(28)),u=n(304),d=a(n(138)),h="undefined"===typeof window,f={left:-1e3,top:0,offset:0,visible:!1};function p(e){var t=e.menuRef,n=e.isSelectingText,r=e.props,o=r.view,a=r.active,s=o.state.selection,u=function(e){var t=c.useState({width:0,height:0}),n=i(t,2),r=n[0],o=n[1];return c.useEffect((function(){var t=new l.default((function(e){e.forEach((function(e){var t=e.target;r.width===t.clientWidth&&r.height===t.clientHeight||o({width:t.clientWidth,height:t.clientHeight})}))}));return t.observe(e.current),function(){return t.disconnect()}}),[e]),r}(t),d=u.width,p=u.height;if(!a||!d||!p||h||n)return f;var g=o.coordsAtPos(s.$from.pos),m=o.coordsAtPos(s.$to.pos),v={top:Math.min(g.top,m.top),bottom:Math.max(g.bottom,m.bottom),left:Math.min(g.left,m.left),right:Math.max(g.right,m.right)},_=s.isColSelection&&s.isColSelection(),b=s.isRowSelection&&s.isRowSelection();if(_){var y=o.domAtPos(s.$from.pos).node.getBoundingClientRect().width;v.top-=20,v.right=v.left+y}b&&(v.right=v.left=v.left-18);var S=Math.abs(v.right-v.left)/2,C=v.left+S,k=Math.min(window.innerWidth-d-12,Math.max(12,C-d/2)),E=Math.min(window.innerHeight-p-12,Math.max(12,v.top-p)),w=k-(C-d/2);return{left:Math.round(k+window.scrollX),top:Math.round(E+window.scrollY),offset:Math.round(w),visible:!0}}function g(e){var t=e.forwardedRef||c.createRef(),n=c.useState(!1),r=i(n,2),o=r[0],a=r[1],s=p({menuRef:t,isSelectingText:o,props:e});return c.useEffect((function(){var t=function(){e.active||a(!0)},n=function(){a(!1)};return window.addEventListener("mousedown",t),window.addEventListener("mouseup",n),function(){window.removeEventListener("mousedown",t),window.removeEventListener("mouseup",n)}}),[e.active]),c.createElement(u.Portal,null,c.createElement(m,{active:e.active&&s.visible,ref:t,offset:s.offset,style:{top:"".concat(s.top,"px"),left:"".concat(s.left,"px")}},s.visible&&e.children))}var m=d.default.div(o(),(function(e){return e.theme.zIndex+100}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.theme.toolbarBackground}),(function(e){return e.offset||0}),(function(e){return e.active&&"\n transform: translateY(-6px) scale(1);\n pointer-events: all;\n opacity: 1;\n "}));t.default=c.forwardRef((function(e,t){return c.createElement(g,Object.assign({},e,{forwardedRef:t}))}))},function(e,t,n){"use strict";var r=n(149),i=n(14),o=n(192),a=n(249),s=n(50),l=n(51),c=n(56),u=n(57);function d(){var e=r(["\n background: ",";\n position: absolute;\n top: 100%;\n width: 100%;\n height: auto;\n left: 0;\n padding: 4px 8px 8px;\n margin: 0;\n margin-top: -3px;\n margin-bottom: 0;\n border-radius: 0 0 4px 4px;\n overflow-y: auto;\n max-height: 25vh;\n"]);return d=function(){return e},e}function h(){var e=r(["\n margin-left: -8px;\n margin-right: -8px;\n min-width: 336px;\n"]);return h=function(){return e},e}var f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var g=f(n(28)),m=n(157),v=n(193),_=f(n(138)),b=p(n(325)),y=p(n(320)),S=p(n(326)),C=p(n(327)),k=p(n(654)),E=function(e){c(n,e);var t=u(n);function n(){var e;return s(this,n),(e=t.apply(this,arguments)).discardInputValue=!1,e.initialValue=e.href,e.initialSelectionLength=e.props.to-e.props.from,e.state={selectedIndex:-1,value:e.href,previousValue:"",results:{}},e.componentWillUnmount=function(){if(!e.discardInputValue&&e.state.value!==e.initialValue){var t=(e.state.value||"").trim();if(!t)return e.handleRemoveLink();e.save(t,t)}},e.save=function(t,n){if(0!==(t=t.trim()).length){e.discardInputValue=!0;var r=e.props,i=r.from,o=r.to;b.default(t)||t.startsWith("/")||(t="https://".concat(t)),e.props.onSelectLink({href:t,title:n,from:i,to:o})}},e.handleKeyDown=function(t){switch(t.key){case"Enter":t.preventDefault();var n=e.state,r=n.selectedIndex,i=n.value,o=e.state.results[i]||[],a=e.props.onCreateLink;if(r>=0){var s=o[r];s?e.save(s.url,s.title):a&&r===o.length&&e.handleCreateLink(e.suggestedLinkTitle)}else e.save(i,i);return void(e.initialSelectionLength&&e.moveSelectionToEnd());case"Escape":return t.preventDefault(),void(e.initialValue?e.setState({value:e.initialValue},e.moveSelectionToEnd):e.handleRemoveLink());case"ArrowUp":if(t.shiftKey)return;t.preventDefault(),t.stopPropagation();var l=e.state.selectedIndex-1;return void e.setState({selectedIndex:Math.max(-1,l)});case"ArrowDown":if(t.shiftKey)return;case"Tab":t.preventDefault(),t.stopPropagation();var c=e.state,u=c.selectedIndex,d=c.value,h=(e.state.results[d]||[]).length,f=u+1;return void e.setState({selectedIndex:Math.min(f,h)})}},e.handleFocusLink=function(t){e.setState({selectedIndex:t})},e.handleChange=function(){var t=a(i.mark((function t(n){var r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.target.value,e.setState({value:r,selectedIndex:-1}),!(a=r.trim())||!e.props.onSearchLink){t.next=14;break}return t.prev=4,t.next=7,e.props.onSearchLink(a);case 7:s=t.sent,e.setState((function(e){return{results:Object.assign(Object.assign({},e.results),o({},a,s)),previousValue:a}})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.error(t.t0);case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}(),e.handleOpenLink=function(t){t.preventDefault(),e.props.onClickLink(e.href,t)},e.handleCreateLink=function(t){e.discardInputValue=!0;var n=e.props.onCreateLink;if(0!==(t=t.trim()).length)return n?n(t):void 0},e.handleRemoveLink=function(){e.discardInputValue=!0;var t=e.props,n=t.from,r=t.to,i=t.mark,o=t.view,a=t.onRemoveLink,s=e.props.view,l=s.state,c=s.dispatch;i&&c(l.tr.removeMark(n,r,i)),a&&a(),o.focus()},e.handleSelectLink=function(t,n){return function(r){r.preventDefault(),e.save(t,n),e.initialSelectionLength&&e.moveSelectionToEnd()}},e.moveSelectionToEnd=function(){var t=e.props,n=t.to,r=t.view,i=r.state;(0,r.dispatch)(m.setTextSelection(n)(i.tr)),r.focus()},e}return l(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.dictionary,r=t.theme,i=this.state,o=i.value,a=i.selectedIndex,s=this.state.results[o.trim()]||this.state.results[this.state.previousValue]||[],l=this.props.tooltip,c=o.match(/^https?:\/\//i),u=this.suggestedLinkTitle,d=!!this.props.onCreateLink&&!(u===this.initialValue)&&u.length>0&&!c,h=!!u&&(d||s.length>0);return g.createElement(w,null,g.createElement(S.default,{value:o,placeholder:d?n.findOrCreateDoc:n.searchOrPasteLink,onKeyDown:this.handleKeyDown,onChange:this.handleChange,autoFocus:""===this.href}),g.createElement(C.default,{onClick:this.handleOpenLink,disabled:!o},g.createElement(l,{tooltip:n.openLink,placement:"top"},g.createElement(v.OpenIcon,{color:r.toolbarItem}))),g.createElement(C.default,{onClick:this.handleRemoveLink},g.createElement(l,{tooltip:n.removeLink,placement:"top"},this.initialValue?g.createElement(v.TrashIcon,{color:r.toolbarItem}):g.createElement(v.CloseIcon,{color:r.toolbarItem}))),h&&g.createElement(O,{id:"link-search-results"},s.map((function(t,n){return g.createElement(k.default,{key:t.url,title:t.title,subtitle:t.subtitle,icon:g.createElement(v.DocumentIcon,{color:r.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(n)},onClick:e.handleSelectLink(t.url,t.title),selected:n===a})})),d&&g.createElement(k.default,{key:"create",title:u,subtitle:n.createNewDoc,icon:g.createElement(v.PlusIcon,{color:r.toolbarItem}),onMouseOver:function(){return e.handleFocusLink(s.length)},onClick:function(){e.handleCreateLink(u),e.initialSelectionLength&&e.moveSelectionToEnd()},selected:s.length===a})))}},{key:"href",get:function(){return this.props.mark?this.props.mark.attrs.href:""}},{key:"suggestedLinkTitle",get:function(){var e=this.props.view.state,t=this.state.value,n=e.doc.cut(e.selection.from,e.selection.to).textContent;return t.trim()||n.trim()}}]),n}(g.Component),w=_.default(y.default)(h()),O=_.default.ol(d(),(function(e){return e.theme.toolbarBackground}));t.default=_.withTheme(E)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){try{return new URL(e),!0}catch(t){return!1}}},function(e,t,n){"use strict";var r=n(149);function i(){var e=r(["\n font-size: 15px;\n background: ",";\n color: ",";\n border-radius: 2px;\n padding: 3px 8px;\n border: 0;\n margin: 0;\n outline: none;\n flex-grow: 1;\n"]);return i=function(){return e},e}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(138)).default.input(i(),(function(e){return e.theme.toolbarInput}),(function(e){return e.theme.toolbarItem}));t.default=a},function(e,t,n){"use strict";var r=n(149);function i(){var e=r(["\n display: inline-block;\n flex: 0;\n width: 24px;\n height: 24px;\n cursor: pointer;\n margin-left: 10px;\n border: none;\n background: none;\n transition: opacity 100ms ease-in-out;\n padding: 0;\n opacity: 0.7;\n outline: none;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:hover {\n opacity: 1;\n }\n\n &:disabled {\n opacity: 0.3;\n cursor: default;\n }\n\n ",";\n"]);return i=function(){return e},e}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(138));t.default=a.default.button(i(),(function(e){return e.active&&"opacity: 1;"}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var i=e.index(),o=e.start()+n.offset,a=i+1,s=o+n.node.nodeSize;i>0&&r.isInSet(e.parent.child(i-1).marks);)i-=1,o-=e.parent.child(i).nodeSize;for(;a1&&void 0!==arguments[1]?arguments[1]:0;"text"===r.type.name&&r.marks.forEach((function(e){if("link"===e.type.name&&e.attrs.href===t&&(n={node:r,pos:i}))return!1})),r.content.size&&r.descendants(e)}(e),n}var s=function(){var e=i(r.mark((function e(t,n,i,s){var l,c,u,d,h,f,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.dispatch,c=t.state,u=s.onCreateLink,d=s.onShowToast,e.prev=2,e.next=5,u(n);case 5:if(h=e.sent,f=a(t.state.doc,i)){e.next=9;break}return e.abrupt("return");case 9:l(t.state.tr.removeMark(f.pos,f.pos+f.node.nodeSize,c.schema.marks.link).addMark(f.pos,f.pos+f.node.nodeSize,c.schema.marks.link.create({href:h}))),e.next=19;break;case 12:if(e.prev=12,e.t0=e.catch(2),p=a(t.state.doc,i)){e.next=17;break}return e.abrupt("return");case 17:l(t.state.tr.removeMark(p.pos,p.pos+p.node.nodeSize,c.schema.marks.link)),d&&d(s.dictionary.createLinkError,o.ToastType.Error);case 19:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,n,r,i){return e.apply(this,arguments)}}();t.default=s},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}},function(e,t,n){"use strict";var r=n(250),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(334)),a=n(219);t.default=function(e,t,n,i,s){var l=i.filter((function(e){return/image/i.test(e.type)}));if(0!==l.length){var c=s.dictionary,u=s.uploadImage,d=s.onImageUploadStart,h=s.onImageUploadStop,f=s.onShowToast;if(u){t.preventDefault(),d&&d();var p,g=e.state.schema,m=0,v=r(l);try{var _=function(){var t=p.value,r={},i=e.state.tr;i.setMeta(o.default,{add:{id:r,file:t,pos:n}}),e.dispatch(i),u(t).then((function(t){var n=o.findPlaceholder(e.state,r);if(null!==n){var i=e.state.tr.replaceWith(n,n,g.nodes.image.create({src:t})).setMeta(o.default,{remove:{id:r}});e.dispatch(i)}})).catch((function(t){console.error(t);var n=e.state.tr.setMeta(o.default,{remove:{id:r}});e.dispatch(n),f&&f(c.imageUploadError,a.ToastType.Error)})).finally((function(){++m===l.length&&h&&h()}))};for(v.s();!(p=v.n()).done;)_()}catch(b){v.e(b)}finally{v.f()}}else console.warn("uploadImage callback must be defined to handle image uploads.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(37),i=n(114),o=new r.Plugin({state:{init:function(){return i.DecorationSet.empty},apply:function(e,t){t=t.map(e.mapping,e.doc);var n=e.getMeta(this);if(n&&n.add){var r=document.createElement("div");r.className="image placeholder";var o=document.createElement("img");o.src=URL.createObjectURL(n.add.file),r.appendChild(o);var a=i.Decoration.widget(n.add.pos,r,{id:n.add.id});t=t.add(e.doc,[a])}else n&&n.remove&&(t=t.remove(t.find(null,null,(function(e){return e.id===n.remove.id}))));return t}},props:{decorations:function(e){return this.getState(e)}}});t.default=o,t.findPlaceholder=function(e,t){var n=o.getState(e).find(null,null,(function(e){return e.id===t}));return n.length?n[0].from:null}},function(e,t,n){"use strict";var r=n(169),i=n(179),o=n(192),a=n(50),s=n(51),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(208),u=n(675),d=n(729),h=l(n(730)),f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;a(this,e),n&&t.forEach((function(e){e.bindEditor(n)})),this.extensions=t,this.embeds=n?n.props.embeds:void 0}return s(e,[{key:"serializer",value:function(){var e=this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),o({},t.name,t.toMarkdown))}),{}),t=this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),o({},t.name,t.toMarkdown))}),{});return new d.MarkdownSerializer(e,t)}},{key:"parser",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return"mark"===e.type||"node"===e.type})).reduce((function(e,t){var n=t.parseMarkdown();return n?Object.assign(Object.assign({},e),o({},t.markdownToken||t.name,n)):e}),{});return new u.MarkdownParser(t,h.default({embeds:this.embeds}),n)}},{key:"keymaps",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.keys})).map((function(e){return e.keys({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(i(n),i(r)).map((function(e){return c.keymap(e)}))}},{key:"inputRules",value:function(e){var t=e.schema,n=this.extensions.filter((function(e){return["extension"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({schema:t})})),r=this.extensions.filter((function(e){return["node","mark"].includes(e.type)})).filter((function(e){return e.inputRules})).map((function(e){return e.inputRules({type:t["".concat(e.type,"s")][e.name],schema:t})}));return[].concat(i(n),i(r)).reduce((function(e,t){return[].concat(i(e),i(t))}),[])}},{key:"commands",value:function(e){var t=e.schema,n=e.view;return this.extensions.filter((function(e){return e.commands})).reduce((function(e,i){var o=i.name,a=i.type,s={},l=i.commands(Object.assign({schema:t},["node","mark"].includes(a)?{type:t["".concat(a,"s")][o]}:{})),c=function(e,t){return!!n.editable&&(n.focus(),e(t)(n.state,n.dispatch,n))},u=function(e,t){Array.isArray(t)?s[e]=function(e){return t.forEach((function(t){return c(t,e)}))}:"function"===typeof t&&(s[e]=function(e){return c(t,e)})};return"object"===typeof l?Object.entries(l).forEach((function(e){var t=r(e,2),n=t[0],i=t[1];u(n,i)})):u(o,l),Object.assign(Object.assign({},e),s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(e){return"node"===e.type})).reduce((function(e,t){return Object.assign(Object.assign({},e),o({},t.name,t.schema))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(e){return"mark"===e.type})).reduce((function(e,t){var n=t.name,r=t.schema;return Object.assign(Object.assign({},e),o({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(e){return e.plugins})).reduce((function(e,t){var n=t.plugins;return[].concat(i(e),i(n))}),[])}}]),e}();t.default=f},function(e,t,n){"use strict";e.exports=n(677)},function(e,t,n){"use strict";e.exports.encode=n(220),e.exports.decode=n(678),e.exports.format=n(679),e.exports.parse=n(680)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)"),a=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=o,e.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(e,t,n){"use strict";function r(e,t){var n,r,i,o,a,s=[],l=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1&&t[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=e.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(r=e.scanDelims(e.pos,42===o),n=0;n?@\[\]\\^_`{|}~]/g,lower:!0})))}t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a(e.textContent);return 0===t?n:"".concat(n,"-").concat(t)}},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),n}(s(n(100)).default);t.default=l},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"toMarkdown",value:function(e,t){e.text(t.text)}},{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),n}(s(n(100)).default);t.default=l},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(126),c=s(n(100)),u=s(n(348)),d=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[l.wrappingInputRule(/^\s*>\s$/,t)]}},{key:"commands",value:function(e){var t=e.type;return function(){return u.default(t)}}},{key:"keys",value:function(e){var t=e.type;return{"Ctrl->":u.default(t),"Mod-]":u.default(t)}}},{key:"toMarkdown",value:function(e,t){e.wrapBlock("> ",null,t,(function(){return e.renderContent(t)}))}},{key:"parseMarkdown",value:function(){return{block:"blockquote"}}},{key:"name",get:function(){return"blockquote"}},{key:"schema",get:function(){return{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}}}}]),n}(c.default);t.default=d},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(127),o=r(n(218));t.default=function(e,t){return function(n,r){return o.default(e)(n)?i.lift(n,r):i.wrapIn(e,t)(n,r)}}},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(126),c=s(n(286)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return c.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-8":c.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[l.wrappingInputRule(/^\s*([-+*])\s$/,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return(t.attrs.bullet||"*")+" "}))}},{key:"parseMarkdown",value:function(){return{block:"bullet_list"}}},{key:"name",get:function(){return"bullet_list"}},{key:"schema",get:function(){return{content:"list_item+",group:"block",parseDOM:[{tag:"ul"}],toDOM:function(){return["ul",0]}}}}]),n}(s(n(100)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"name",get:function(){return"code_block"}},{key:"markdownToken",get:function(){return"code_block"}}]),n}(s(n(288)).default);t.default=l},function(e,t,n){"use strict";(function(t){var r=function(){var e="Prism"in t,n=e?t.Prism:void 0;return function(){e?t.Prism=n:delete t.Prism;e=void 0,n=void 0}}();("undefined"===typeof window?"undefined"===typeof self?{}:self:window).Prism={manual:!0,disableWorkerMessageHandler:!0};var i=n(352),o=n(748),a=n(754),s=n(366),l=n(367),c=n(368),u=n(369);r();var d={}.hasOwnProperty;function h(){}h.prototype=a;var f=new h;function p(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");void 0===f.languages[e.displayName]&&e(f)}e.exports=f,f.highlight=function(e,t){var n,r=a.highlight;if("string"!==typeof e)throw new Error("Expected `string` for `value`, got `"+e+"`");if("Object"===f.util.type(t))n=t,t=null;else{if("string"!==typeof t)throw new Error("Expected `string` for `name`, got `"+t+"`");if(!d.call(f.languages,t))throw new Error("Unknown language: `"+t+"` is not registered");n=f.languages[t]}return r.call(this,e,n,t)},f.register=p,f.alias=function(e,t){var n,r,i,o,a=f.languages,s=e;t&&((s={})[e]=t);for(n in s)for(r=s[n],i=(r="string"===typeof r?[r]:r).length,o=-1;++o=48&&t<=57}},function(e,t,n){"use strict";function r(e){e.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&/,"&"))})),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[\s\S]*?>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",o)}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}e.exports=r,r.displayName="markup",r.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},function(e,t,n){"use strict";function r(e){!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(e)}e.exports=r,r.displayName="css",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}e.exports=r,r.displayName="clike",r.aliases=[]},function(e,t,n){"use strict";function r(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}}}),e.languages.markup&&e.languages.markup.tag.addInlined("script","javascript"),e.languages.js=e.languages.javascript}e.exports=r,r.displayName="javascript",r.aliases=["js"]},function(e,t,n){"use strict";var r=n(765),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),a()}return u}},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(126),c=s(n(286)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-7":c.default(t,n.nodes.checkbox_item)}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return c.default(t,n.nodes.checkbox_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[l.wrappingInputRule(/^-?\s*(\[ \])\s$/i,t)]}},{key:"toMarkdown",value:function(e,t){e.renderList(t," ",(function(){return"- "}))}},{key:"parseMarkdown",value:function(){return{block:"checkbox_list"}}},{key:"name",get:function(){return"checkbox_list"}},{key:"schema",get:function(){var e=this;return{group:"block",content:"checkbox_item+",toDOM:function(){return["ul",{class:e.name},0]},parseDOM:[{tag:'[class="'.concat(this.name,'"]')}]}}}]),n}(s(n(100)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(287),c=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.apply(this,arguments)).handleChange=function(t){var n=e.editor.view,r=n.state.tr,i=t.target.getBoundingClientRect(),o=i.top,a=i.left,s=n.posAtCoords({top:o,left:a});if(s){var l=r.setNodeMarkup(s.inside,void 0,{checked:t.target.checked});n.dispatch(l)}},e}return i(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:l.splitListItem(t),Tab:l.sinkListItem(t),"Shift-Tab":l.liftListItem(t),"Mod-]":l.sinkListItem(t),"Mod-[":l.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.checked?"[x] ":"[ ] "),e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"checkbox_item",getAttrs:function(e){return{checked:!!e.attrGet("checked")||void 0}}}}},{key:"name",get:function(){return"checkbox_item"}},{key:"schema",get:function(){var e=this;return{attrs:{checked:{default:!1}},content:"paragraph block*",defining:!0,draggable:!1,parseDOM:[{tag:'li[data-type="'.concat(this.name,'"]'),getAttrs:function(e){return{checked:e.className.includes("checked")}}}],toDOM:function(t){var n=document.createElement("input");return n.type="checkbox",n.addEventListener("change",e.handleChange),t.attrs.checked&&(n.checked=!0),["li",{"data-type":e.name,class:t.attrs.checked?"checked":void 0},["span",{contentEditable:!1},n],["div",0]]}}}}]),n}(s(n(100)).default);t.default=c},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=s(n(28)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"component",value:function(e){var t=e.isEditable,n=e.isSelected,r=e.theme,i=e.node,o=i.attrs.component;return c.createElement(o,{attrs:i.attrs,isEditable:t,isSelected:n,theme:r})}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){return r(n.tr.replaceSelectionWith(t.create(e)).scrollIntoView()),!0}}}},{key:"toMarkdown",value:function(e,t){e.ensureNewLine(),e.write("["+e.esc(t.attrs.href)+"]("+e.esc(t.attrs.href)+")"),e.write("\n\n")}},{key:"parseMarkdown",value:function(){return{node:"embed",getAttrs:function(e){return{href:e.attrGet("href"),matches:e.attrGet("matches"),component:e.attrGet("component")}}}}},{key:"name",get:function(){return"embed"}},{key:"schema",get:function(){return{content:"inline*",group:"block",atom:!0,attrs:{href:{},component:{},matches:{}},parseDOM:[{tag:"iframe"}],toDOM:function(e){return["iframe",{src:e.attrs.href,contentEditable:!1},0]}}}}]),n}(l(n(100)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(n(100)),c=n(248),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"keys",value:function(e){var t=e.type;return{"Shift-Enter":function(e,n){return!!c.isInTable(e)&&(n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0)}}}},{key:"toMarkdown",value:function(e){e.write(" \\n ")}},{key:"parseMarkdown",value:function(){return{node:"br"}}},{key:"name",get:function(){return"br"}},{key:"schema",get:function(){return{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}}}]),n}(l.default);t.default=u},function(e,t,n){"use strict";var r=n(192),i=n(50),o=n(51),a=n(56),s=n(57),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(37),u=l(n(370)),d=n(114),h=n(126),f=n(127),p=l(n(773)),g=l(n(774)),m=l(n(344)),v=l(n(100)),_=n(219),b=function(e){a(n,e);var t=s(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).className="heading-name",e.handleCopyLink=function(){return function(t){var n=t.currentTarget.parentNode.previousSibling;if(!n.className.includes(e.className))throw new Error("Did not find anchor as previous sibling of heading");var r="#".concat(n.id),i=window.location.href.split("#")[0];u.default(i+r),e.options.onShowToast&&e.options.onShowToast(e.options.dictionary.linkCopied,_.ToastType.Info)}},e}return o(n,[{key:"toMarkdown",value:function(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"heading",getAttrs:function(e){return{level:+e.tag.slice(1)}}}}},{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(e){return g.default(t,n.nodes.paragraph,e)}}},{key:"keys",value:function(e){var t=e.type,n=this.options.levels.reduce((function(e,n){return Object.assign(Object.assign({},e),r({},"Shift-Ctrl-".concat(n),f.setBlockType(t,{level:n})))}),{});return Object.assign(Object.assign({},n),{Backspace:p.default(t)})}},{key:"inputRules",value:function(e){var t=e.type;return this.options.levels.map((function(e){return h.textblockTypeInputRule(new RegExp("^(#{1,".concat(e,"})\\s$")),t,(function(){return{level:e}}))}))}},{key:"name",get:function(){return"heading"}},{key:"defaultOptions",get:function(){return{levels:[1,2,3,4]}}},{key:"schema",get:function(){var e=this;return{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,draggable:!1,parseDOM:this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e},contentElement:"span"}})),toDOM:function(t){var n=document.createElement("button");return n.innerText="#",n.type="button",n.className="heading-anchor",n.addEventListener("click",e.handleCopyLink()),["h".concat(t.attrs.level+(e.options.offset||0)),n,["span",0]]}}}},{key:"plugins",get:function(){var e=this,t=function(t){var n=[],r={};return t.descendants((function(t,i){if(t.type.name===e.name){var o=m.default(t),a=o;r[o]>0&&(a=m.default(t,r[o])),r[o]=void 0!==r[o]?r[o]+1:1,n.push(d.Decoration.widget(i,(function(){var t=document.createElement("a");return t.id=a,t.className=e.className,t}),{side:-1,key:a}))}})),d.DecorationSet.create(t,n)},n=new c.Plugin({state:{init:function(e,n){return t(n.doc)},apply:function(e,n){return e.docChanged?t(e.doc):n}},props:{decorations:function(e){return n.getState(e)}}});return[n]}}]),n}(v.default);t.default=b},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(126),c=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"commands",value:function(e){var t=e.type;return function(){return function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"keys",value:function(e){var t=e.type;return{"Mod-_":function(e,n){return n(e.tr.replaceSelectionWith(t.create()).scrollIntoView()),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new l.InputRule(/^(?:---|___\s|\*\*\*\s)$/,(function(e,n,r,i){var o=e.tr;return n[0]&&o.replaceWith(r-1,i,t.create({})),o}))]}},{key:"toMarkdown",value:function(e,t){e.write(t.attrs.markup||"\n---"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{node:"hr"}}},{key:"name",get:function(){return"hr"}},{key:"schema",get:function(){return{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["hr"]}}}}]),n}(s(n(100)).default);t.default=c},function(e,t,n){"use strict";var r=n(149),i=n(169),o=n(50),a=n(51),s=n(56),l=n(57);function c(){var e=r(["\n border: 0;\n display: block;\n font-size: 13px;\n font-style: italic;\n color: ",";\n padding: 2px 0;\n line-height: 16px;\n text-align: center;\n width: 100%;\n min-height: 1em;\n outline: none;\n background: none;\n resize: none;\n\n &:empty:before {\n color: ",';\n content: "Write a caption";\n pointer-events: none;\n }\n']);return c=function(){return e},e}function u(){var e=r(["\n line-height: 0;\n display: inline-block;\n"]);return u=function(){return e},e}var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=d(n(28)),p=n(37),g=n(126),m=n(157),v=h(n(138)),_=h(n(775)),b=h(n(332)),y=h(n(334)),S=h(n(333)),C=h(n(100)),k=/!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\)/,E={display:"inline-block",maxWidth:"100%",maxHeight:"75vh"},w=function(e){s(n,e);var t=l(n);function n(){var e;return o(this,n),(e=t.apply(this,arguments)).handleKeyDown=function(t){var n=t.node,r=t.getPos;return function(t){if("Enter"===t.key){t.preventDefault();var i=e.editor.view,o=r()+n.nodeSize;return i.focus(),void i.dispatch(m.setTextSelection(o)(i.state.tr))}if("Backspace"===t.key&&""===t.target.innerText){var a=e.editor.view,s=a.state.doc.resolve(r()),l=a.state.tr.setSelection(new p.NodeSelection(s));return a.dispatch(l.deleteSelection()),void a.focus()}}},e.handleBlur=function(t){var n=t.node,r=t.getPos;return function(t){var i=t.target.innerText,o=n.attrs.src;if(i!==n.attrs.alt){var a=e.editor.view,s=a.state.tr,l=r(),c=s.setNodeMarkup(l,void 0,{src:o,alt:i});a.dispatch(c)}}},e.handleSelect=function(t){var n=t.getPos;return function(t){t.preventDefault();var r=e.editor.view,i=r.state.doc.resolve(n()),o=r.state.tr.setSelection(new p.NodeSelection(i));r.dispatch(o)}},e.component=function(t){var n=t.theme,r=t.isEditable,i=t.isSelected,o=t.node.attrs,a=o.alt,s=o.src;return f.createElement("div",{contentEditable:!1,className:"image"},f.createElement(O,{className:i?"ProseMirror-selectednode":"",onClick:r?e.handleSelect(t):void 0},f.createElement(_.default,{image:{src:s,alt:a,style:E},defaultStyles:{overlay:{backgroundColor:n.background}},shouldRespectMaxDimension:!0})),(r||a)&&f.createElement(T,{onKeyDown:e.handleKeyDown(t),onBlur:e.handleBlur(t),tabIndex:-1,contentEditable:r,suppressContentEditableWarning:!0},a))},e}return a(n,[{key:"toMarkdown",value:function(e,t){e.write("!["+e.esc((t.attrs.alt||"").replace("\n","")||"")+"]("+e.esc(t.attrs.src)+")")}},{key:"parseMarkdown",value:function(){return{node:"image",getAttrs:function(e){return{src:e.attrGet("src"),alt:e.children[0]&&e.children[0].content||null}}}}},{key:"commands",value:function(e){var t=e.type;return function(e){return function(n,r){var i=n.selection,o=i.$cursor?i.$cursor.pos:i.$to.pos,a=t.create(e);return r(n.tr.insert(o,a)),!0}}}},{key:"inputRules",value:function(e){var t=e.type;return[new g.InputRule(k,(function(e,n,r,o){var a=i(n,3),s=a[0],l=a[1],c=a[2],u=e.tr;return s&&u.replaceWith(r-1,o,t.create({src:c,alt:l})),u}))]}},{key:"name",get:function(){return"image"}},{key:"schema",get:function(){return{inline:!0,attrs:{src:{},alt:{default:null}},content:"text*",marks:"",group:"inline",selectable:!0,draggable:!0,parseDOM:[{tag:"div[class=image]",getAttrs:function(e){var t=e.getElementsByTagName("img")[0];return{src:t.getAttribute("src"),alt:t.getAttribute("alt")}}}],toDOM:function(e){return["div",{class:"image"},["img",Object.assign(Object.assign({},e.attrs),{contentEditable:!1})],["p",{class:"caption"},0]]}}}},{key:"plugins",get:function(){return[y.default,(e=this.options,new p.Plugin({props:{handleDOMEvents:{paste:function(t,n){if(t.props.editable&&!t.props.editable(t.state)||!e.uploadImage)return!1;if(!n.clipboardData)return!1;var r=Array.prototype.slice.call(n.clipboardData.items).map((function(e){return e.getAsFile()})).filter((function(e){return e}));if(0===r.length)return!1;var i=t.state.tr;i.selection.empty||i.deleteSelection();var o=i.selection.from;return S.default(t,n,o,r,e),!0},drop:function(t,n){if(t.props.editable&&!t.props.editable(t.state)||!e.uploadImage)return!1;var r=b.default(n).filter((function(e){return/image/i.test(e.type)}));if(0===r.length)return!1;var i=t.posAtCoords({left:n.clientX,top:n.clientY});return!!i&&(S.default(t,n,i.pos,r,e),!0)}}}}))];var e}}]),n}(C.default);t.default=w;var O=v.default.span(u()),T=v.default.p(c(),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.placeholder}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={keys:["Enter"],keyCode:13},i=function(e){var t=e.keyCode,n=e.keys;return function(e){return e.keyCode?e.keyCode===t:-1!==n.indexOf(e.key)}},o=(t.isEnterOrSpaceBarKey=function(e){return i(r)(e)||o(e)},t.isTabKey=i({keys:["Tab"],keyCode:9}),t.isSpaceBarKey=i({keys:[" "],keyCode:32}));t.isEscapeKey=i({keys:["Escape","Esc"],keyCode:27})},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(287),c=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"keys",value:function(e){var t=e.type;return{Enter:l.splitListItem(t),Tab:l.sinkListItem(t),"Shift-Tab":l.liftListItem(t),"Mod-]":l.sinkListItem(t),"Mod-[":l.liftListItem(t)}}},{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"list_item"}}},{key:"name",get:function(){return"list_item"}},{key:"schema",get:function(){return{content:"paragraph block*",defining:!0,draggable:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}}}}]),n}(s(n(100)).default);t.default=c},function(e,t,n){"use strict";var r=n(169),i=n(50),o=n(51),a=n(56),s=n(57),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var u=n(126),d=l(n(348)),h=n(193),f=c(n(28)),p=l(n(151)),g=function(e){a(n,e);var t=s(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).handleStyleChange=function(t){var n=e.editor.view,r=n.state.tr,i=t.target,o=i.getBoundingClientRect(),a=o.top,s=o.left,l=n.posAtCoords({top:a,left:s});if(l){var c=r.setNodeMarkup(l.inside,void 0,{style:i.value});n.dispatch(c)}},e}return o(n,[{key:"commands",value:function(e){var t=e.type;return function(e){return d.default(t,e)}}},{key:"inputRules",value:function(e){var t=e.type;return[u.wrappingInputRule(/^:::$/,t)]}},{key:"toMarkdown",value:function(e,t){e.write("\n:::"+(t.attrs.style||"info")+"\n"),e.renderContent(t),e.ensureNewLine(),e.write(":::"),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"container_notice",getAttrs:function(e){return{style:e.info}}}}},{key:"styleOptions",get:function(){return Object.entries({info:this.options.dictionary.info,warning:this.options.dictionary.warning,tip:this.options.dictionary.tip})}},{key:"name",get:function(){return"container_notice"}},{key:"schema",get:function(){var e=this;return{attrs:{style:{default:"info"}},content:"block+",group:"block",defining:!0,draggable:!0,parseDOM:[{tag:"div.notice-block",preserveWhitespace:"full",contentElement:"div:last-child",getAttrs:function(e){return{style:e.className.includes("tip")?"tip":e.className.includes("warning")?"warning":void 0}}}],toDOM:function(t){var n,i=document.createElement("select");i.addEventListener("change",e.handleStyleChange),e.styleOptions.forEach((function(e){var n=r(e,2),o=n[0],a=n[1],s=document.createElement("option");s.value=o,s.innerText=a,s.selected=t.attrs.style===o,i.appendChild(s)})),n="tip"===t.attrs.style?f.createElement(h.StarredIcon,{color:"currentColor"}):"warning"===t.attrs.style?f.createElement(h.WarningIcon,{color:"currentColor"}):f.createElement(h.InfoIcon,{color:"currentColor"});var o=document.createElement("div");return o.className="icon",p.default.render(n,o),["div",{class:"notice-block ".concat(t.attrs.style)},o,["div",{contentEditable:!1},i],["div",0]]}}}}]),n}(l(n(100)).default);t.default=g},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(126),c=s(n(286)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"commands",value:function(e){var t=e.type,n=e.schema;return function(){return c.default(t,n.nodes.list_item)}}},{key:"keys",value:function(e){var t=e.type,n=e.schema;return{"Shift-Ctrl-9":c.default(t,n.nodes.list_item)}}},{key:"inputRules",value:function(e){var t=e.type;return[l.wrappingInputRule(/^(\d+)\.\s$/,t,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))]}},{key:"toMarkdown",value:function(e,t){var n=t.attrs.order||1,r="".concat(n+t.childCount-1).length,i=e.repeat(" ",r+2);e.renderList(t,i,(function(t){var i="".concat(n+t);return e.repeat(" ",r-i.length)+i+". "}))}},{key:"parseMarkdown",value:function(){return{block:"ordered_list"}}},{key:"name",get:function(){return"ordered_list"}},{key:"schema",get:function(){return{attrs:{order:{default:1}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1}}}],toDOM:function(e){return 1===e.attrs.order?["ol",0]:["ol",{start:e.attrs.order},0]}}}}]),n}(s(n(100)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"keys",value:function(e){var t=e.type;return{"Shift-Ctrl-0":l.setBlockType(t)}}},{key:"commands",value:function(e){var t=e.type;return function(){return l.setBlockType(t)}}},{key:"toMarkdown",value:function(e,t){""!==t.textContent.trim()||0!==t.childCount||e.inTable?(e.renderInline(t),e.closeBlock(t)):e.write("\\\n")}},{key:"parseMarkdown",value:function(){return{block:"paragraph"}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),n}(s(n(100)).default);t.default=c},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=s(n(100)),c=n(114),u=n(248),d=n(157),h=n(37),f=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"commands",value:function(e){var t=e.schema;return{createTable:function(e){var n=e.rowsCount,r=e.colsCount;return function(e,i){var o=e.tr.selection.anchor+1,a=d.createTable(t,n,r),s=e.tr.replaceSelectionWith(a).scrollIntoView(),l=s.doc.resolve(o);s.setSelection(h.TextSelection.near(l)),i(s)}},setColumnAttr:function(e){var t=e.index,n=e.alignment;return function(e,r){var i=d.getCellsInColumn(t)(e.selection)||[],o=e.tr;i.forEach((function(e){var t=e.pos;o=o.setNodeMarkup(t,null,{alignment:n})})),r(o)}},addColumnBefore:function(){return u.addColumnBefore},addColumnAfter:function(){return u.addColumnAfter},deleteColumn:function(){return u.deleteColumn},addRowAfter:function(e){var t=e.index;return function(e,n){if(0===t){var r=d.addRowAt(t+2,!0)(e.tr);n(d.moveRow(t+2,t+1)(r))}else n(d.addRowAt(t+1,!0)(e.tr))}},deleteRow:function(){return u.deleteRow},deleteTable:function(){return u.deleteTable},toggleHeaderColumn:function(){return u.toggleHeaderColumn},toggleHeaderRow:function(){return u.toggleHeaderRow},toggleHeaderCell:function(){return u.toggleHeaderCell},setCellAttr:function(){return u.setCellAttr},fixTables:function(){return u.fixTables}}}},{key:"keys",value:function(){return{Tab:u.goToNextCell(1),"Shift-Tab":u.goToNextCell(-1),Enter:function(e,t){if(!u.isInTable(e))return!1;var n=d.getCellsInColumn(0)(e.selection)||[];return t(d.addRowAt(n.length,!0)(e.tr)),!0}}}},{key:"toMarkdown",value:function(e,t){e.renderTable(t),e.closeBlock(t)}},{key:"parseMarkdown",value:function(){return{block:"table"}}},{key:"name",get:function(){return"table"}},{key:"schema",get:function(){return{content:"tr+",tableRole:"table",isolating:!0,group:"block",parseDOM:[{tag:"table"}],toDOM:function(){return["div",{class:"scrollable-wrapper"},["div",{class:"scrollable"},["table",{class:"rme-table"},["tbody",0]]]]}}}},{key:"plugins",get:function(){var e=this;return[u.tableEditing(),new h.Plugin({props:{decorations:function(t){var n=t.doc,r=[],i=0;return n.descendants((function(t,n){if(t.type.name===e.name){var o=document.getElementsByClassName("rme-table")[i];if(o){var a=o.parentElement;!!(a&&a.scrollWidth>a.clientWidth)&&r.push(c.Decoration.widget(n+1,(function(){var e=document.createElement("div");return e.className="scrollable-shadow right",e}))),i++}}})),c.DecorationSet.create(n,r)}}})]}}]),n}(l.default);t.default=f},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(114),c=n(37),u=n(157),d=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"td",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"td"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"cell",isolating:!0,parseDOM:[{tag:"td"}],toDOM:function(e){return["td",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new c.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,i=[],o=u.getCellsInColumn(0)(r);return o&&o.forEach((function(n,a){var s=n.pos;0===a&&i.push(l.Decoration.widget(s+1,(function(){var n="grip-table";u.isTableSelected(r)&&(n+=" selected");var i=document.createElement("a");return i.className=n,i.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectTable(t)})),i}))),i.push(l.Decoration.widget(s+1,(function(){var n="grip-row";u.isRowSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===o.length-1&&(n+=" last");var i=document.createElement("a");return i.className=n,i.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectRow(a,t)})),i})))})),l.DecorationSet.create(n,i)}}})]}}]),n}(s(n(100)).default);t.default=d},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(114),c=n(37),u=n(157),d=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"toMarkdown",value:function(e,t){e.renderContent(t)}},{key:"parseMarkdown",value:function(){return{block:"th",getAttrs:function(e){return{alignment:e.info}}}}},{key:"name",get:function(){return"th"}},{key:"schema",get:function(){return{content:"paragraph+",tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th"}],toDOM:function(e){return["th",e.attrs.alignment?{style:"text-align: ".concat(e.attrs.alignment)}:{},0]},attrs:{colspan:{default:1},rowspan:{default:1},alignment:{default:null}}}}},{key:"plugins",get:function(){var e=this;return[new c.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,i=[],o=u.getCellsInRow(0)(r);return o&&o.forEach((function(n,a){var s=n.pos;i.push(l.Decoration.widget(s+1,(function(){var n="grip-column";u.isColumnSelected(a)(r)&&(n+=" selected"),0===a?n+=" first":a===o.length-1&&(n+=" last");var i=document.createElement("a");return i.className=n,i.addEventListener("mousedown",(function(n){n.preventDefault(),e.options.onSelectColumn(a,t)})),i})))})),l.DecorationSet.create(n,i)}}})]}}]),n}(s(n(100)).default);t.default=d},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"parseMarkdown",value:function(){return{block:"tr"}}},{key:"name",get:function(){return"tr"}},{key:"schema",get:function(){return{content:"(th | td)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}}}}]),n}(s(n(100)).default);t.default=l},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[c.default(/(?:\*\*)([^*]+)(?:\*\*)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-b":l.toggleMark(t),"Mod-B":l.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"strong"}}},{key:"name",get:function(){return"strong"}},{key:"schema",get:function(){return{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:function(e){return"bold"===e}}],toDOM:function(){return["strong"]}}}},{key:"toMarkdown",get:function(){return{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202));function u(e,t){var n,r=/`+/g,i=0;if(e.isText)for(;n=r.exec(e.text);)i=Math.max(i,n[0].length);for(var o=i>0&&t>0?" `":"`",a=0;a0&&t<0&&(o+=" "),o}var d=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[c.default(/(?:^|[^`])(`([^`]+)`)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod`":l.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"code_inline"}}},{key:"name",get:function(){return"code_inline"}},{key:"schema",get:function(){return{excludes:"_",parseDOM:[{tag:"code"}],toDOM:function(){return["code",{spellCheck:!1}]}}}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return u(n.child(r),-1)},close:function(e,t,n,r){return u(n.child(r-1),1)},escape:!1}}}]),n}(s(n(180)).default);t.default=d},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[c.default(/(?:==)([^=]+)(?:==)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-Ctrl-h":l.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"mark"}}},{key:"name",get:function(){return"mark"}},{key:"schema",get:function(){return{parseDOM:[{tag:"mark"}],toDOM:function(){return["mark"]}}}},{key:"toMarkdown",get:function(){return{open:"==",close:"==",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[c.default(/(?:^|[^_])(_([^_]+)_)$/,t),c.default(/(?:^|[^*])(\*([^*]+)\*)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-i":l.toggleMark(t),"Mod-I":l.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"em"}}},{key:"name",get:function(){return"em"}},{key:"schema",get:function(){return{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(e){return"italic"===e}}],toDOM:function(){return["em"]}}}},{key:"toMarkdown",get:function(){return{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){"use strict";var r=n(169),i=n(50),o=n(51),a=n(56),s=n(57),l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(127),u=n(37),d=n(126),h=l(n(180)),f=/\[(.+)]\((\S+)\)/;function p(e,t,n,r){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;var i=t.child(n+(r<0?-1:0));if(!i.isText||i.text!==e.attrs.href||i.marks[i.marks.length-1]!==e)return!1;if(n===(r<0?1:t.childCount-1))return!0;var o=t.child(n+(r<0?-2:1));return!e.isInSet(o.marks)}var g=function(e){a(n,e);var t=s(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"inputRules",value:function(e){var t=this,n=e.type;return[new d.InputRule(f,(function(e,i,o,a){var s=r(i,3),l=s[0],c=s[1],u=s[2],d=e.tr;return l&&d.replaceWith(o,a,t.editor.schema.text(c)).addMark(o,o+c.length,n.create({href:u})),d}))]}},{key:"commands",value:function(e){var t=e.type;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{href:""},n=e.href;return c.toggleMark(t,{href:n})}}},{key:"keys",value:function(e){var t=this,n=e.type;return{"Mod-k":function(e,r){return e.selection.empty?(t.options.onKeyboardShortcut(),!0):c.toggleMark(n,{href:""})(e,r)}}}},{key:"parseMarkdown",value:function(){return{mark:"link",getAttrs:function(e){return{href:e.attrGet("href"),title:e.attrGet("title")||null}}}}},{key:"name",get:function(){return"link"}},{key:"schema",get:function(){return{attrs:{href:{default:""}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(e){return{href:e.getAttribute("href")}}}],toDOM:function(e){return["a",Object.assign(Object.assign({},e.attrs),{rel:"noopener noreferrer nofollow"}),0]}}}},{key:"plugins",get:function(){var e=this;return[new u.Plugin({props:{handleDOMEvents:{mouseover:function(t,n){return!!(n.target instanceof HTMLAnchorElement&&!n.target.className.includes("ProseMirror-widget")&&e.options.onHoverLink)&&e.options.onHoverLink(n)},click:function(t,n){if(t.props.editable&&t.props.editable(t.state)&&!n.metaKey)return!1;if(n.target instanceof HTMLAnchorElement){var r=n.target.href||(n.target.parentNode instanceof HTMLAnchorElement?n.target.parentNode.href:"");if(r.startsWith("#")&&e.options.onClickHashtag)return n.stopPropagation(),n.preventDefault(),e.options.onClickHashtag(r,n),!0;if(e.options.onClickLink)return n.stopPropagation(),n.preventDefault(),e.options.onClickLink(r,n),!0}return!1}}}})]}},{key:"toMarkdown",get:function(){return{open:function(e,t,n,r){return p(t,n,r,1)?"<":"["},close:function(e,t,n,r){return p(t,n,r,-1)?">":"]("+e.esc(t.attrs.href)+(t.attrs.title?" "+e.quote(t.attrs.title):"")+")"}}}}]),n}(h.default);t.default=g},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"keys",value:function(e){var t=e.type;return{"Mod-d":l.toggleMark(t)}}},{key:"inputRules",value:function(e){var t=e.type;return[c.default(/~([^~]+)~$/,t)]}},{key:"parseMarkdown",value:function(){return{mark:"strikethrough"}}},{key:"name",get:function(){return"strikethrough"}},{key:"schema",get:function(){return{parseDOM:[{tag:"s"},{tag:"del"},{tag:"strike"}],toDOM:function(){return["del",0]}}}},{key:"toMarkdown",get:function(){return{open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"markdownToken",get:function(){return"s"}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(37),c=s(n(328)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"parseMarkdown",value:function(){return{mark:"placeholder"}}},{key:"name",get:function(){return"placeholder"}},{key:"schema",get:function(){return{parseDOM:[{tag:"span.template-placeholder"}],toDOM:function(){return["span",{class:"template-placeholder"}]}}}},{key:"toMarkdown",get:function(){return{open:"!!",close:"!!",mixable:!0,expelEnclosingWhitespace:!0}}},{key:"plugins",get:function(){var e=this;return[new l.Plugin({props:{handleTextInput:function(t,n,r,i){if(e.editor.props.template)return!1;var o=t.state,a=t.dispatch,s=o.doc.resolve(n),u=c.default(s,o.schema.marks.placeholder);if(!u)return!1;var d=Math.min(n,u.from),h=Math.max(r,u.to);a(o.tr.removeMark(u.from,u.to,o.schema.marks.placeholder).insertText(i,d,h));var f=t.state.doc.resolve(d+i.length);return a(t.state.tr.setSelection(l.TextSelection.near(f))),!0},handleKeyDown:function(t,n){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if("ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"Backspace"!==n.key)return!1;var r=t.state,i=t.dispatch;if("Backspace"===n.key){var o=c.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);return!!o&&(i(r.tr.removeMark(o.from,o.to,r.schema.marks.placeholder).insertText("",o.from,o.to)),!0)}if("ArrowLeft"===n.key){var a=c.default(r.doc.resolve(Math.max(0,r.selection.from-1)),r.schema.marks.placeholder);if(!a)return!1;var s=r.doc.resolve(a.from);return i(r.tr.setSelection(l.TextSelection.near(s))),!0}if("ArrowRight"===n.key){var u=c.default(r.selection.$from,r.schema.marks.placeholder);if(!u)return!1;var d=r.doc.resolve(u.to);return i(r.tr.setSelection(l.TextSelection.near(d))),!0}return!1},handleClick:function(t,n,r){if(!t.props.editable||!t.props.editable(t.state))return!1;if(e.editor.props.template)return!1;if(r.target instanceof HTMLSpanElement&&r.target.className.includes("template-placeholder")){var i=t.state,o=t.dispatch,a=c.default(i.selection.$from,i.schema.marks.placeholder);if(!a)return!1;r.stopPropagation(),r.preventDefault();var s=i.doc.resolve(a.from);return o(i.tr.setSelection(l.TextSelection.near(s))),!0}return!1}}})]}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=n(127),c=s(n(202)),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"inputRules",value:function(e){var t=e.type;return[c.default(/(?:__)([^_]+)(?:__)$/,t)]}},{key:"keys",value:function(e){var t=e.type;return{"Mod-u":l.toggleMark(t)}}},{key:"parseMarkdown",value:function(){return{mark:"underline"}}},{key:"name",get:function(){return"underline"}},{key:"schema",get:function(){return{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:function(e){return"underline"===e}}],toDOM:function(){return["u",0]}}}},{key:"toMarkdown",get:function(){return{open:"__",close:"__",mixable:!0,expelEnclosingWhitespace:!0}}}]),n}(s(n(180)).default);t.default=u},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),a="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(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,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!==typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(200))},function(e,t){e.exports={}.hasOwnProperty},function(e,t,n){e.exports=function(e){var t,n,s,l,c,u,d,h={},f=-1;for(;++fh?n(o):(e.consume(o),v):41===o?f--?(e.consume(o),v):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):null===o||i(o)?f?n(o):(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(a),t(o)):r(o)?n(o):(e.consume(o),92===o?_:v)}function _(t){return 40===t||41===t||92===t?(e.consume(t),v):v(t)}};var r=n(401),i=n(182),o=n(98)},function(e,t,n){e.exports=function(e,t,n,o,a,s){var l,c=this,u=0;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),e.enter(s),d};function d(i){return null===i||91===i||93===i&&!l||94===i&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs||u>999?n(i):93===i?(e.exit(s),e.enter(a),e.consume(i),e.exit(a),e.exit(o),t):r(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(i))}function h(t){return null===t||91===t||93===t||r(t)||u++>999?(e.exit("chunkString"),d(t)):(e.consume(t),l=l||!i(t),92===t?f:h)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,h):h(t)}};var r=n(98),i=n(170)},function(e,t,n){e.exports=function(e,t){var n;return function a(s){if(r(s))return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a;if(i(s))return o(e,a,n?"linePrefix":"lineSuffix")(s);return t(s)}};var r=n(98),i=n(170),o=n(101)},function(e,t,n){e.exports=function(e,t,n,o,a,s){var l;return function(t){return e.enter(o),e.enter(a),e.consume(t),e.exit(a),l=40===t?41:t,c};function c(n){return n===l?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),t):(e.enter(s),u(n))}function u(t){return t===l?(e.exit(s),c(l)):null===t?n(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===l||null===t||r(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?h:d)}function h(t){return t===l||92===t?(e.consume(t),d):d(t)}};var r=n(98),i=n(101)},function(e,t,n){e.exports=function(e){var t={},n=-1;for(;++n=f||l+10;n--){var r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===q.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}},{key:"_processInputToken",value:function(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===A.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(z.nonVoidHtmlElementStartTagWithTrailingSolidus)}},{key:"_isIntegrationPoint",value:function(e,t){var n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return H.isIntegrationPoint(n,r,i,t)}},{key:"_reconstructActiveFormattingElements",value:function(){var e=this.activeFormattingElements.length;if(e){var t=e,n=null;do{if(t--,(n=this.activeFormattingElements.entries[t]).type===R.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(var r=t;r=0;e--){var n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));var r=this.treeAdapter.getTagName(n),i=be[r];if(i){this.insertionMode=i;break}if(!(t||r!==G.TD&&r!==G.TH)){this.insertionMode=ue;break}if(!t&&r===G.HEAD){this.insertionMode=J;break}if(r===G.SELECT){this._resetInsertionModeForSelect(e);break}if(r===G.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===G.HTML){this.insertionMode=this.headElement?te:X;break}if(t){this.insertionMode=ne;break}}}},{key:"_resetInsertionModeForSelect",value:function(e){if(e>0)for(var t=e-1;t>0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===G.TEMPLATE)break;if(r===G.TABLE)return void(this.insertionMode=he)}this.insertionMode=de}},{key:"_pushTmplInsertionMode",value:function(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}},{key:"_popTmplInsertionMode",value:function(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}},{key:"_isElementCausesFosterParenting",value:function(e){var t=this.treeAdapter.getTagName(e);return t===G.TABLE||t===G.TBODY||t===G.TFOOT||t===G.THEAD||t===G.TR}},{key:"_shouldFosterParentOnInsertion",value:function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}},{key:"_findFosterParentingLocation",value:function(){for(var e={parent:null,beforeElement:null},t=this.openElements.stackTop;t>=0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===G.TEMPLATE&&i===q.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===G.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}},{key:"_fosterParentElement",value:function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}},{key:"_fosterParentText",value:function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}},{key:"_isSpecialElement",value:function(e){var t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return W.SPECIAL_ELEMENTS[n][t]}}]),e}();function ke(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ot(e,t),n}function Ee(e,t){for(var n=null,r=e.openElements.stackTop;r>=0;r--){var i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function we(e,t,n){for(var r=t,i=e.openElements.getCommonAncestor(t),o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);var s=e.activeFormattingElements.getElementEntry(a),l=s&&o>=3;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(a)):(a=Oe(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Oe(e,t){var n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Te(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{var r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===G.TEMPLATE&&i===q.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function xe(e,t,n){var r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function Ne(e,t){for(var n,r=0;r<8&&(n=ke(e,t));r++){var i=Ee(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;var o=we(e,i,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(o),Te(e,a,o),xe(e,i,n)}}function De(){}function Le(e){e._err(z.misplacedDoctype)}function Ae(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function Ie(e,t){e._appendCommentNode(t,e.document)}function Re(e,t){e._insertCharacters(t)}function Me(e){e.stopped=!0}function Pe(e,t){e._err(z.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,W.DOCUMENT_MODE.QUIRKS),e.insertionMode=Z,e._processToken(t)}function je(e,t){e._insertFakeRootElement(),e.insertionMode=X,e._processToken(t)}function Fe(e,t){e._insertFakeElement(G.HEAD),e.headElement=e.openElements.current,e.insertionMode=J,e._processToken(t)}function Be(e,t){var n=t.tagName;n===G.HTML?nt(e,t):n===G.BASE||n===G.BASEFONT||n===G.BGSOUND||n===G.LINK||n===G.META?(e._appendElement(t,q.HTML),t.ackSelfClosing=!0):n===G.TITLE?e._switchToTextParsing(t,A.MODE.RCDATA):n===G.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,A.MODE.RAWTEXT):(e._insertElement(t,q.HTML),e.insertionMode=ee):n===G.NOFRAMES||n===G.STYLE?e._switchToTextParsing(t,A.MODE.RAWTEXT):n===G.SCRIPT?e._switchToTextParsing(t,A.MODE.SCRIPT_DATA):n===G.TEMPLATE?(e._insertTemplate(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=fe,e._pushTmplInsertionMode(fe)):n===G.HEAD?e._err(z.misplacedStartTagForHeadElement):He(e,t)}function Ue(e,t){var n=t.tagName;n===G.HEAD?(e.openElements.pop(),e.insertionMode=te):n===G.BODY||n===G.BR||n===G.HTML?He(e,t):n===G.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==G.TEMPLATE&&e._err(z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(G.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(z.endTagWithoutMatchingOpenElement)}function He(e,t){e.openElements.pop(),e.insertionMode=te,e._processToken(t)}function ze(e,t){var n=t.type===A.EOF_TOKEN?z.openElementsLeftAfterEof:z.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=J,e._processToken(t)}function Ve(e,t){e._insertFakeElement(G.BODY),e.insertionMode=ne,e._processToken(t)}function We(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ge(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function qe(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function Ke(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ye(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $e(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ze(e,t){e._appendElement(t,q.HTML),t.ackSelfClosing=!0}function Xe(e,t){e._switchToTextParsing(t,A.MODE.RAWTEXT)}function Je(e,t){e.openElements.currentTagName===G.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function et(e,t){e.openElements.hasInScope(G.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,q.HTML)}function tt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function nt(e,t){var n=t.tagName;switch(n.length){case 1:n===G.I||n===G.S||n===G.B||n===G.U?Ye(e,t):n===G.P?qe(e,t):n===G.A?function(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(Ne(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):tt(e,t);break;case 2:n===G.DL||n===G.OL||n===G.UL?qe(e,t):n===G.H1||n===G.H2||n===G.H3||n===G.H4||n===G.H5||n===G.H6?function(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement();var n=e.openElements.currentTagName;n!==G.H1&&n!==G.H2&&n!==G.H3&&n!==G.H4&&n!==G.H5&&n!==G.H6||e.openElements.pop(),e._insertElement(t,q.HTML)}(e,t):n===G.LI||n===G.DD||n===G.DT?function(e,t){e.framesetOk=!1;for(var n=t.tagName,r=e.openElements.stackTop;r>=0;r--){var i=e.openElements.items[r],o=e.treeAdapter.getTagName(i),a=null;if(n===G.LI&&o===G.LI?a=G.LI:n!==G.DD&&n!==G.DT||o!==G.DD&&o!==G.DT||(a=o),a){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(o!==G.ADDRESS&&o!==G.DIV&&o!==G.P&&e._isSpecialElement(i))break}e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML)}(e,t):n===G.EM||n===G.TT?Ye(e,t):n===G.BR?Qe(e,t):n===G.HR?function(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===G.RB?et(e,t):n===G.RT||n===G.RP?function(e,t){e.openElements.hasInScope(G.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(G.RTC),e._insertElement(t,q.HTML)}(e,t):n!==G.TH&&n!==G.TD&&n!==G.TR&&tt(e,t);break;case 3:n===G.DIV||n===G.DIR||n===G.NAV?qe(e,t):n===G.PRE?Ke(e,t):n===G.BIG?Ye(e,t):n===G.IMG||n===G.WBR?Qe(e,t):n===G.XMP?function(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,A.MODE.RAWTEXT)}(e,t):n===G.SVG?function(e,t){e._reconstructActiveFormattingElements(),H.adjustTokenSVGAttrs(t),H.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,q.SVG):e._insertElement(t,q.SVG),t.ackSelfClosing=!0}(e,t):n===G.RTC?et(e,t):n!==G.COL&&tt(e,t);break;case 4:n===G.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===G.BASE||n===G.LINK||n===G.META?Be(e,t):n===G.BODY?function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===G.MAIN||n===G.MENU?qe(e,t):n===G.FORM?function(e,t){var n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===G.CODE||n===G.FONT?Ye(e,t):n===G.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(G.NOBR)&&(Ne(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===G.AREA?Qe(e,t):n===G.MATH?function(e,t){e._reconstructActiveFormattingElements(),H.adjustTokenMathMLAttrs(t),H.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,q.MATHML):e._insertElement(t,q.MATHML),t.ackSelfClosing=!0}(e,t):n===G.MENU?function(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML)}(e,t):n!==G.HEAD&&tt(e,t);break;case 5:n===G.STYLE||n===G.TITLE?Be(e,t):n===G.ASIDE?qe(e,t):n===G.SMALL?Ye(e,t):n===G.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==W.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=ie}(e,t):n===G.EMBED?Qe(e,t):n===G.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML);var n=A.getTokenAttr(t,K.TYPE);n&&n.toLowerCase()===$||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===G.PARAM||n===G.TRACK?Ze(e,t):n===G.IMAGE?function(e,t){t.tagName=G.IMG,Qe(e,t)}(e,t):n!==G.FRAME&&n!==G.TBODY&&n!==G.TFOOT&&n!==G.THEAD&&tt(e,t);break;case 6:n===G.SCRIPT?Be(e,t):n===G.CENTER||n===G.FIGURE||n===G.FOOTER||n===G.HEADER||n===G.HGROUP||n===G.DIALOG?qe(e,t):n===G.BUTTON?function(e,t){e.openElements.hasInScope(G.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(G.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1}(e,t):n===G.STRIKE||n===G.STRONG?Ye(e,t):n===G.APPLET||n===G.OBJECT?$e(e,t):n===G.KEYGEN?Qe(e,t):n===G.SOURCE?Ze(e,t):n===G.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,A.MODE.RAWTEXT)}(e,t):n===G.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode===ie||e.insertionMode===ae||e.insertionMode===le||e.insertionMode===ce||e.insertionMode===ue?e.insertionMode=he:e.insertionMode=de}(e,t):n===G.OPTION?Je(e,t):tt(e,t);break;case 7:n===G.BGSOUND?Be(e,t):n===G.DETAILS||n===G.ADDRESS||n===G.ARTICLE||n===G.SECTION||n===G.SUMMARY?qe(e,t):n===G.LISTING?Ke(e,t):n===G.MARQUEE?$e(e,t):n===G.NOEMBED?Xe(e,t):n!==G.CAPTION&&tt(e,t);break;case 8:n===G.BASEFONT?Be(e,t):n===G.FRAMESET?function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,q.HTML),e.insertionMode=ge)}(e,t):n===G.FIELDSET?qe(e,t):n===G.TEXTAREA?function(e,t){e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.tokenizer.state=A.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=re}(e,t):n===G.TEMPLATE?Be(e,t):n===G.NOSCRIPT?e.options.scriptingEnabled?Xe(e,t):tt(e,t):n===G.OPTGROUP?Je(e,t):n!==G.COLGROUP&&tt(e,t);break;case 9:n===G.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(G.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.tokenizer.state=A.MODE.PLAINTEXT}(e,t):tt(e,t);break;case 10:n===G.BLOCKQUOTE||n===G.FIGCAPTION?qe(e,t):tt(e,t);break;default:tt(e,t)}}function rt(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function it(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ot(e,t){for(var n=t.tagName,r=e.openElements.stackTop;r>0;r--){var i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function at(e,t){var n=t.tagName;switch(n.length){case 1:n===G.A||n===G.B||n===G.I||n===G.S||n===G.U?Ne(e,t):n===G.P?function(e){e.openElements.hasInButtonScope(G.P)||e._insertFakeElement(G.P),e._closePElement()}(e):ot(e,t);break;case 2:n===G.DL||n===G.UL||n===G.OL?rt(e,t):n===G.LI?function(e){e.openElements.hasInListItemScope(G.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(G.LI),e.openElements.popUntilTagNamePopped(G.LI))}(e):n===G.DD||n===G.DT?function(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===G.H1||n===G.H2||n===G.H3||n===G.H4||n===G.H5||n===G.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===G.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===G.EM||n===G.TT?Ne(e,t):ot(e,t);break;case 3:n===G.BIG?Ne(e,t):n===G.DIR||n===G.DIV||n===G.NAV||n===G.PRE?rt(e,t):ot(e,t);break;case 4:n===G.BODY?function(e){e.openElements.hasInScope(G.BODY)&&(e.insertionMode=pe)}(e):n===G.HTML?function(e,t){e.openElements.hasInScope(G.BODY)&&(e.insertionMode=pe,e._processToken(t))}(e,t):n===G.FORM?function(e){var t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(G.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(G.FORM):e.openElements.remove(n))}(e):n===G.CODE||n===G.FONT||n===G.NOBR?Ne(e,t):n===G.MAIN||n===G.MENU?rt(e,t):ot(e,t);break;case 5:n===G.ASIDE?rt(e,t):n===G.SMALL?Ne(e,t):ot(e,t);break;case 6:n===G.CENTER||n===G.FIGURE||n===G.FOOTER||n===G.HEADER||n===G.HGROUP||n===G.DIALOG?rt(e,t):n===G.APPLET||n===G.OBJECT?it(e,t):n===G.STRIKE||n===G.STRONG?Ne(e,t):ot(e,t);break;case 7:n===G.ADDRESS||n===G.ARTICLE||n===G.DETAILS||n===G.SECTION||n===G.SUMMARY||n===G.LISTING?rt(e,t):n===G.MARQUEE?it(e,t):ot(e,t);break;case 8:n===G.FIELDSET?rt(e,t):n===G.TEMPLATE?Ue(e,t):ot(e,t);break;case 10:n===G.BLOCKQUOTE||n===G.FIGCAPTION?rt(e,t):ot(e,t);break;default:ot(e,t)}}function st(e,t){e.tmplInsertionModeStackTop>-1?mt(e,t):e.stopped=!0}function lt(e,t){var n=e.openElements.currentTagName;n===G.TABLE||n===G.TBODY||n===G.TFOOT||n===G.THEAD||n===G.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=oe,e._processToken(t)):dt(e,t)}function ct(e,t){var n=t.tagName;switch(n.length){case 2:n===G.TD||n===G.TH||n===G.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY),e.insertionMode=le,e._processToken(t)}(e,t):dt(e,t);break;case 3:n===G.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP),e.insertionMode=se,e._processToken(t)}(e,t):dt(e,t);break;case 4:n===G.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,q.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):dt(e,t);break;case 5:n===G.TABLE?function(e,t){e.openElements.hasInTableScope(G.TABLE)&&(e.openElements.popUntilTagNamePopped(G.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===G.STYLE?Be(e,t):n===G.TBODY||n===G.TFOOT||n===G.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=le}(e,t):n===G.INPUT?function(e,t){var n=A.getTokenAttr(t,K.TYPE);n&&n.toLowerCase()===$?e._appendElement(t,q.HTML):dt(e,t),t.ackSelfClosing=!0}(e,t):dt(e,t);break;case 6:n===G.SCRIPT?Be(e,t):dt(e,t);break;case 7:n===G.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,q.HTML),e.insertionMode=ae}(e,t):dt(e,t);break;case 8:n===G.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=se}(e,t):n===G.TEMPLATE?Be(e,t):dt(e,t);break;default:dt(e,t)}}function ut(e,t){var n=t.tagName;n===G.TABLE?e.openElements.hasInTableScope(G.TABLE)&&(e.openElements.popUntilTagNamePopped(G.TABLE),e._resetInsertionMode()):n===G.TEMPLATE?Ue(e,t):n!==G.BODY&&n!==G.CAPTION&&n!==G.COL&&n!==G.COLGROUP&&n!==G.HTML&&n!==G.TBODY&&n!==G.TD&&n!==G.TFOOT&&n!==G.TH&&n!==G.THEAD&&n!==G.TR&&dt(e,t)}function dt(e,t){var n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function ht(e,t){var n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(G.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function vt(e,t){e.insertionMode=ne,e._processToken(t)}function _t(e,t){e.insertionMode=ne,e._processToken(t)}e.exports=Ce},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=n(173),l=n(262),c=n(422),u=function(e){o(n,e);var t=a(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).tokenizer=e,i.posTracker=s.install(e.preprocessor,c),i.currentAttrLocation=null,i.ctLoc=null,i}return i(n,[{key:"_getCurrentLocation",value:function(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}},{key:"_attachCurrentAttrLocationInfo",value:function(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;var e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}},{key:"_getOverriddenMethods",value:function(e,t){var n={_createStartTagToken:function(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken:function(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken:function(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken:function(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken:function(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken:function(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr:function(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName:function(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue:function(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken:function(){var n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===l.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken:function(){var n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(l.MODE).forEach((function(r){var i=l.MODE[r];n[i]=function(n){e.ctLoc=e._getCurrentLocation(),t[i].call(this,n)}})),n}}]),n}(s);e.exports=u},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=function(e){o(n,e);var t=a(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).preprocessor=e,i.isEol=!1,i.lineStartPos=0,i.droppedBufferSize=0,i.offset=0,i.col=0,i.line=1,i}return i(n,[{key:"_getOverriddenMethods",value:function(e,t){return{advance:function(){var n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat:function(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk:function(){var n=this.pos;t.dropParsedChunk.call(this);var r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}]),n}(n(173));e.exports=s},function(e,t,n){"use strict";var r=n(227),i=n(931),o=n(933);e.exports=function(e){var t,n,o,a,s,d=e.children||[],h=d.length,f=_(e),g=p(e,{}),m=-1;if("text"===e.type||"comment"===e.type)return u(e,{whiteSpace:g,breakBefore:!0,breakAfter:!0});t=[];for(;++ms&&(s=a):""!==a&&(s&&o.push(r(l,s)),s=0,o.push(a));return o.join("")};var a=Math.min,s=Math.max,l="\n";function c(e,t,n,r){return"element"===e.type?function(e,t,n,r){var a,s,u,d=p(e,r),h=e.children||[],f=h.length,g=-1,b=[];if(function(e){var t=e.properties||{};return i(e,["datalist","head","noembed","noframes","rp","script","style","template","title","noscript"])||t.hidden||i(e,"dialog")&&!t.open}(e))return b;i(e,"br")||v(e)&&o(n,e,v)?u=l:i(e,"p")?(s=2,u=2):_(e)&&(s=1,u=1);for(;++g?@[\]^`{|}~\u2019]/g;function s(){if(!(this instanceof s))return new s;this.reset()}function l(e,t){return"string"!==typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(a,"").replace(r(),"").replace(o,"-"))}s.prototype.slug=function(e,t){for(var n=this,r=l(e,!0===t),o=r;i.call(n.occurrences,r);)n.occurrences[o]++,r=o+"-"+n.occurrences[o];return n.occurrences[r]=0,r},s.prototype.reset=function(){this.occurrences=Object.create(null)},s.slug=l},function(e,t,n){"use strict";e.exports=function(e){return new RegExp("^("+e+")$","i")}},function(e,t,n){"use strict";e.exports=function(e,t){var n=t||{};function o(t){var n=o.invalid,a=o.handlers;return t&&i.call(t,e)&&(n=i.call(a,t[e])?a[t[e]]:o.unknown),(n||r).apply(this,arguments)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o};var r=Function.prototype,i={}.hasOwnProperty},function(e,t,n){!function(e){"use strict";function t(e,t,n,r){this.cm=e,this.options=r;var i={listenForChanges:!1};for(var o in r)i[o]=r[o];i.className||(i.className="CodeMirror-search-match"),this.annotation=e.annotateScrollbar(i),this.query=t,this.caseFold=n,this.gap={from:e.firstLine(),to:e.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var a=this;e.on("change",this.changeHandler=function(e,t){a.onChange(t)})}e.defineExtension("showMatchesOnScrollbar",(function(e,n,r){return"string"==typeof r&&(r={className:r}),r||(r={}),new t(this,e,n,r)}));var n=1e3;function r(e,t,n){return e<=t?e:Math.max(t,e+n)}t.prototype.findMatches=function(){if(this.gap){for(var t=0;t=this.gap.to);t++)o.to.line>=this.gap.from&&this.matches.splice(t--,1);for(var r=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||n;r.findNext();){var o;if((o={from:r.from(),to:r.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,o),this.matches.length>i)break}this.gap=null}},t.prototype.onChange=function(t){var n=t.from.line,i=e.changeEnd(t).line,o=i-t.to.line;if(this.gap?(this.gap.from=Math.min(r(this.gap.from,n,o),t.from.line),this.gap.to=Math.max(r(this.gap.to,n,o),t.from.line)):this.gap={from:t.from.line,to:i+1},o)for(var a=0;at||o>e&&a=t&&s>=n?o-e-r:a>t&&sn?a-t+i:0}n.r(t);var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&d(p);){if((p=p.parentNode)===h){f.push(p);break}p===document.body&&o(p)&&!o(document.documentElement)||o(p,u)&&f.push(p)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,_=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,S=b.width,C=b.top,k=b.right,E=b.bottom,w=b.left,O="start"===s||"nearest"===s?C:"end"===s?E:C+y/2,T="center"===l?w+S/2:"end"===l?k:w,x=[],N=0;N=0&&w>=0&&E<=m&&k<=g&&C>=R&&E<=P&&w>=j&&k<=M)return x;var F=getComputedStyle(D),B=parseInt(F.borderLeftWidth,10),U=parseInt(F.borderTopWidth,10),H=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),V=0,W=0,G="offsetWidth"in D?D.offsetWidth-D.clientWidth-B-H:0,q="offsetHeight"in D?D.offsetHeight-D.clientHeight-U-z:0;if(h===D)V="start"===s?O:"end"===s?O-m:"nearest"===s?a(_,_+m,m,U,z,_+O,_+O+y,y):O-m/2,W="start"===l?T:"center"===l?T-g/2:"end"===l?T-g:a(v,v+g,g,B,H,v+T,v+T+S,S),V=Math.max(0,V+_),W=Math.max(0,W+v);else{V="start"===s?O-R-U:"end"===s?O-P+z+q:"nearest"===s?a(R,P,A,U,z+q,O,O+y,y):O-(R+A/2)+q/2,W="start"===l?T-j-B:"center"===l?T-(j+I/2)+G/2:"end"===l?T-M+H+G:a(j,M,I,B,H+G,T,T+S,S);var K=D.scrollLeft,Y=D.scrollTop;O+=Y-(V=Math.max(0,Math.min(Y+V,D.scrollHeight-A+q))),T+=K-(W=Math.max(0,Math.min(K+W,D.scrollWidth-I+G)))}x.push({el:D,top:V,left:W})}return x};function l(e){return e===Object(e)&&0!==Object.keys(e).length}var c,u=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"===typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,o=e.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:t}):(r.scrollTop=i,r.scrollLeft=o)}))}(s(e,r),r.behavior)}},d=function(){return c||(c="performance"in window?performance.now.bind(performance):Date.now),c()};function h(e){var t=d(),n=Math.min((t-e.startTime)/e.duration,1),r=e.ease(n),i=e.startX+(e.x-e.startX)*r,o=e.startY+(e.y-e.startY)*r;e.method(i,o),i!==e.x||o!==e.y?requestAnimationFrame((function(){return h(e)})):e.cb()}function f(e,t,n,r,i,o){var a,s,l;void 0===r&&(r=600),void 0===i&&(i=function(e){return 1+--e*e*e*e*e}),a=e,s=e.scrollLeft,l=e.scrollTop,h({scrollable:a,method:function(t,n){e.scrollLeft=t,e.scrollTop=n},startTime:d(),startX:s,startY:l,x:t,y:n,duration:r,ease:i,cb:o})}var p=function(e,t){var n=t||{};return function(e){return e&&!e.behavior||"smooth"===e.behavior}(n)?u(e,{block:n.block,inline:n.inline,scrollMode:n.scrollMode,boundary:n.boundary,behavior:function(e){return Promise.all(e.reduce((function(e,t){var r=t.el,i=t.left,o=t.top,a=r.scrollLeft,s=r.scrollTop;return a===i&&s===o?e:[].concat(e,[new Promise((function(e){return f(r,i,o,n.duration,n.ease,(function(){return e({el:r,left:[a,i],top:[s,o]})}))}))])}),[]))}}):Promise.resolve(u(e,t))};t.default=p},function(e,t,n){var r=n(242),i=n(514),o=n(516),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,h,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function _(t){var n=l,r=c;return l=c=void 0,p=t,d=e.apply(r,n)}function b(e){return p=e,h=setTimeout(S,t),g?_(e):d}function y(e){var n=e-f;return void 0===f||n>=t||n<0||m&&e-p>=u}function S(){var e=i();if(y(e))return C(e);h=setTimeout(S,function(e){var n=t-(e-f);return m?s(n,u-(e-p)):n}(e))}function C(e){return h=void 0,v&&l?_(e):(l=c=void 0,d)}function k(){var e=i(),n=y(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return b(f);if(m)return clearTimeout(h),h=setTimeout(S,t),_(f)}return void 0===h&&(h=setTimeout(S,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,u=(m="maxWait"in n)?a(o(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},k.flush=function(){return void 0===h?d:C(i())},k}},function(e,t,n){"use strict";var r=n(149),i=n(192),o=n(179),a=n(50),s=n(51),l=n(56),c=n(57);function u(){var e=r(["\n color: ",";\n background: ",";\n font-family: ",";\n font-weight: ",';\n font-size: 1em;\n line-height: 1.7em;\n width: 100%;\n\n .ProseMirror {\n position: relative;\n outline: none;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n }\n\n pre {\n white-space: pre-wrap;\n }\n\n li {\n position: relative;\n }\n\n img {\n max-width: 100%;\n }\n\n .image {\n text-align: center;\n\n img {\n pointer-events: ',";\n }\n }\n\n .image.placeholder {\n position: relative;\n background: ",";\n\n img {\n opacity: 0.5;\n }\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n .ProseMirror-hideselection {\n caret-color: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: 2px solid\n ",';\n }\n\n /* Make sure li selections wrap around markers */\n\n li.ProseMirror-selectednode {\n outline: none;\n }\n\n li.ProseMirror-selectednode:after {\n content: "";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid ',";\n pointer-events: none;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: 1em 0 0.5em;\n font-weight: 500;\n cursor: default;\n\n &:not(.placeholder):before {\n display: ",";\n position: absolute;\n font-family: ",";\n color: ",";\n font-size: 13px;\n left: -24px;\n }\n\n &:hover {\n .heading-anchor {\n opacity: 1;\n }\n }\n }\n\n .heading-name {\n color: ",';\n\n &:hover {\n text-decoration: none;\n }\n }\n\n a:first-child {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n\n h1:not(.placeholder):before {\n content: "H1";\n line-height: 3em;\n }\n h2:not(.placeholder):before {\n content: "H2";\n line-height: 2.8em;\n }\n h3:not(.placeholder):before {\n content: "H3";\n line-height: 2.3em;\n }\n h4:not(.placeholder):before {\n content: "H4";\n line-height: 2.2em;\n }\n h5:not(.placeholder):before {\n content: "H5";\n }\n h6:not(.placeholder):before {\n content: "H6";\n }\n\n .with-emoji {\n margin-left: -1em;\n }\n\n .heading-anchor {\n opacity: 0;\n display: ',";\n color: ",";\n cursor: pointer;\n background: none;\n border: 0;\n outline: none;\n padding: 2px 12px 2px 4px;\n margin: 0;\n position: absolute;\n transition: opacity 100ms ease-in-out;\n font-family: ",";\n font-size: 22px;\n left: -1.3em;\n\n &:focus,\n &:hover {\n color: ",";\n }\n }\n\n .placeholder {\n &:before {\n display: block;\n content: ",";\n pointer-events: none;\n height: 0;\n color: ",";\n }\n }\n\n @media print {\n .placeholder {\n display: none;\n }\n }\n\n .notice-block {\n display: flex;\n align-items: center;\n background: ",";\n color: ",";\n border-radius: 4px;\n padding: 8px 16px;\n margin: 8px 0;\n\n a {\n color: ",";\n }\n\n a:not(.heading-name) {\n text-decoration: underline;\n }\n }\n\n .notice-block .icon {\n width: 24px;\n height: 24px;\n align-self: flex-start;\n margin-right: 4px;\n position: relative;\n top: 1px;\n }\n\n .notice-block.tip {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n .notice-block.warning {\n background: ",";\n color: ",";\n\n a {\n color: ",";\n }\n }\n\n blockquote {\n border-left: 3px solid ",";\n margin: 0;\n padding-left: 10px;\n font-style: italic;\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n .template-placeholder {\n color: ",";\n border-bottom: 1px dotted ",";\n border-radius: 2px;\n cursor: text;\n\n &:hover {\n border-bottom: 1px dotted\n ",";\n }\n }\n\n p {\n position: relative;\n margin: 0;\n }\n\n a {\n color: ",";\n }\n\n a:hover {\n text-decoration: ",";\n }\n\n ul,\n ol {\n margin: 0 0.1em;\n padding: 0 0 0 1em;\n\n ul,\n ol {\n margin: 0;\n }\n }\n\n ol ol {\n list-style: lower-alpha;\n }\n\n ol ol ol {\n list-style: lower-roman;\n }\n\n ul.checkbox_list {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n ul.checkbox_list li {\n display: flex;\n }\n\n ul.checkbox_list li.checked > div > p {\n color: ",";\n text-decoration: line-through;\n }\n\n ul.checkbox_list li input {\n pointer-events: ",";\n opacity: ",";\n margin: 0 0.5em 0 0;\n width: 14px;\n height: 14px;\n }\n\n li p:first-child {\n margin: 0;\n word-break: break-all;\n }\n\n hr {\n height: 0;\n border: 0;\n border-top: 1px solid ",";\n }\n\n code {\n border-radius: 4px;\n border: 1px solid ",";\n padding: 3px 4px;\n font-family: ",";\n font-size: 85%;\n }\n\n mark {\n border-radius: 1px;\n color: ",";\n background: ",";\n }\n\n .code-block,\n .notice-block {\n position: relative;\n\n select,\n button {\n background: ",";\n color: ",";\n border-width: 1px;\n font-size: 13px;\n display: none;\n position: absolute;\n border-radius: 4px;\n padding: 2px;\n z-index: 1;\n top: 4px;\n right: 4px;\n }\n\n button {\n padding: 2px 4px;\n }\n\n &:hover {\n select {\n display: ",";\n }\n\n button {\n display: ",";\n }\n }\n\n select:focus,\n select:active {\n display: inline;\n }\n }\n\n pre {\n display: block;\n overflow-x: auto;\n padding: 0.75em 1em;\n line-height: 1.4em;\n position: relative;\n background: ",";\n border-radius: 4px;\n border: 1px solid ",";\n\n -webkit-font-smoothing: initial;\n font-family: ",";\n font-size: 13px;\n direction: ltr;\n text-align: left;\n white-space: pre;\n word-spacing: normal;\n word-break: normal;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n color: ",";\n margin: 0;\n\n code {\n font-size: 13px;\n background: none;\n padding: 0;\n border: 0;\n }\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: ",";\n }\n\n .token.punctuation {\n color: ",";\n }\n\n .token.namespace {\n opacity: 0.7;\n }\n\n .token.operator,\n .token.boolean,\n .token.number {\n color: ",";\n }\n\n .token.property {\n color: ",";\n }\n\n .token.tag {\n color: ",";\n }\n\n .token.string {\n color: ",";\n }\n\n .token.selector {\n color: ",";\n }\n\n .token.attr-name {\n color: ",";\n }\n\n .token.entity,\n .token.url,\n .language-css .token.string,\n .style .token.string {\n color: ",";\n }\n\n .token.attr-value,\n .token.keyword,\n .token.control,\n .token.directive,\n .token.unit {\n color: ",";\n }\n\n .token.function {\n color: ",";\n }\n\n .token.statement,\n .token.regex,\n .token.atrule {\n color: ",";\n }\n\n .token.placeholder,\n .token.variable {\n color: ",";\n }\n\n .token.deleted {\n text-decoration: line-through;\n }\n\n .token.inserted {\n border-bottom: 1px dotted ",";\n text-decoration: none;\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: bold;\n }\n\n .token.important {\n color: ",";\n }\n\n .token.entity {\n cursor: help;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n border-radius: 4px;\n margin-top: 1em;\n\n tr {\n position: relative;\n border-bottom: 1px solid ",";\n }\n\n th {\n background: ",";\n }\n\n td,\n th {\n position: relative;\n vertical-align: top;\n border: 1px solid ",";\n position: relative;\n padding: 4px 8px;\n text-align: left;\n min-width: 100px;\n }\n\n .selectedCell {\n background: ",';\n\n /* fixes Firefox background color painting over border:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=688556 */\n background-clip: padding-box;\n }\n\n .grip-column {\n /* usage of ::after for all of the table grips works around a bug in\n * prosemirror-tables that causes Safari to hang when selecting a cell\n * in an empty table:\n * https://github.com/ProseMirror/prosemirror/issues/947 */\n &::after {\n content: "";\n cursor: pointer;\n position: absolute;\n top: -16px;\n left: 0;\n width: 100%;\n height: 12px;\n background: ',";\n border-bottom: 3px solid ",";\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.first::after {\n border-top-left-radius: 3px;\n }\n &.last::after {\n border-top-right-radius: 3px;\n }\n &.selected::after {\n background: ",';\n }\n }\n\n .grip-row {\n &::after {\n content: "";\n cursor: pointer;\n position: absolute;\n left: -16px;\n top: 0;\n height: 100%;\n width: 12px;\n background: ',";\n border-right: 3px solid ",";\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.first::after {\n border-top-left-radius: 3px;\n }\n &.last::after {\n border-bottom-left-radius: 3px;\n }\n &.selected::after {\n background: ",';\n }\n }\n\n .grip-table {\n &::after {\n content: "";\n cursor: pointer;\n background: ',";\n width: 13px;\n height: 13px;\n border-radius: 13px;\n border: 2px solid ",";\n position: absolute;\n top: -18px;\n left: -18px;\n display: ",";\n }\n\n &:hover::after {\n background: ",";\n }\n &.selected::after {\n background: ",";\n }\n }\n }\n\n .scrollable-wrapper {\n position: relative;\n margin: 0.5em 0px;\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n\n &:hover {\n scrollbar-color: ","\n ",";\n }\n\n & ::-webkit-scrollbar {\n height: 14px;\n background-color: transparent;\n }\n\n &:hover ::-webkit-scrollbar {\n background-color: ",";\n }\n\n & ::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: 7px;\n }\n\n &:hover ::-webkit-scrollbar-thumb {\n background-color: ",";\n border-color: ",";\n }\n }\n\n .scrollable {\n overflow-y: hidden;\n overflow-x: auto;\n padding-left: 1em;\n margin-left: -1em;\n border-left: 1px solid transparent;\n border-right: 1px solid transparent;\n transition: border 250ms ease-in-out 0s;\n }\n\n .scrollable-shadow {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1em;\n width: 16px;\n transition: box-shadow 250ms ease-in-out;\n border: 0px solid transparent;\n border-left-width: 1em;\n pointer-events: none;\n\n &.left {\n box-shadow: 16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n border-left: 1em solid ",";\n }\n\n &.right {\n right: 0;\n left: auto;\n box-shadow: -16px 0 16px -16px inset rgba(0, 0, 0, 0.25);\n }\n }\n\n .block-menu-trigger {\n display: ",";\n height: 1em;\n color: ",";\n background: none;\n border-radius: 100%;\n font-size: 30px;\n position: absolute;\n transform: scale(0.9);\n transition: color 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275),\n transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n outline: none;\n border: 0;\n line-height: 1;\n margin-top: -6px;\n left: -34px;\n\n &:hover,\n &:focus {\n cursor: pointer;\n transform: scale(1);\n color: ",';\n }\n }\n\n @media print {\n .block-menu-trigger {\n display: none;\n }\n }\n\n .ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n }\n\n .ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid ',';\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n }\n\n @keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n }\n\n .ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n }\n\n @media print {\n em,\n blockquote {\n font-family: "SF Pro Text", ',";\n }\n }\n"]);return u=function(){return e},e}var d=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=d(n(28)),p=h(n(527)),g=n(37),m=n(555),v=n(556),_=n(114),b=n(31),y=n(126),S=n(208),C=n(127),k=n(157),E=d(n(138)),w=n(281),O=h(n(558)),T=h(n(320)),x=h(n(559)),N=h(n(659)),D=h(n(673)),L=h(n(674)),A=h(n(335)),I=h(n(739)),R=h(n(344)),M=h(n(345)),P=h(n(346)),j=h(n(347)),F=h(n(349)),B=h(n(350)),U=h(n(288)),H=h(n(371)),z=h(n(372)),V=h(n(373)),W=h(n(374)),G=h(n(375)),q=h(n(376)),K=h(n(377)),Y=h(n(379)),$=h(n(380)),Q=h(n(381)),Z=h(n(382)),X=h(n(383)),J=h(n(384)),ee=h(n(385)),te=h(n(386)),ne=h(n(387)),re=h(n(388)),ie=h(n(389)),oe=h(n(390)),ae=h(n(391)),se=h(n(392)),le=h(n(393)),ce=h(n(394)),ue=h(n(780)),de=h(n(781)),he=h(n(782)),fe=h(n(783)),pe=h(n(784)),ge=h(n(785)),me=h(n(786)),ve=n(788);t.schema=ve.schema,t.parser=ve.parser,t.serializer=ve.serializer;var _e=n(162);t.Extension=_e.default,t.theme=w.light;var be=function(e){l(n,e);var t=c(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).state={blockMenuOpen:!1,linkMenuOpen:!1,blockMenuSearch:""},e.value=function(){return e.serializer.serialize(e.view.state.doc)},e.handleChange=function(){e.props.onChange&&e.props.onChange((function(){return e.value()}))},e.handleSave=function(){var t=e.props.onSave;t&&t({done:!1})},e.handleSaveAndExit=function(){var t=e.props.onSave;t&&t({done:!0})},e.handleOpenLinkMenu=function(){e.setState({linkMenuOpen:!0})},e.handleCloseLinkMenu=function(){e.setState({linkMenuOpen:!1})},e.handleOpenBlockMenu=function(t){e.setState({blockMenuOpen:!0,blockMenuSearch:t})},e.handleCloseBlockMenu=function(){e.state.blockMenuOpen&&e.setState({blockMenuOpen:!1})},e.handleSelectRow=function(t,n){e.view.dispatch(k.selectRow(t)(n.tr))},e.handleSelectColumn=function(t,n){e.view.dispatch(k.selectColumn(t)(n.tr))},e.handleSelectTable=function(t){e.view.dispatch(k.selectTable(t.tr))},e.focusAtStart=function(){var t=g.Selection.atStart(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.focusAtEnd=function(){var t=g.Selection.atEnd(e.view.state.doc),n=e.view.state.tr.setSelection(t);e.view.dispatch(n),e.view.focus()},e.getHeadings=function(){var t=[],n={};return e.view.state.doc.forEach((function(e){if("heading"===e.type.name){var r=R.default(e),i=r;n[r]>0&&(i=R.default(e,n[r])),n[r]=void 0!==n[r]?n[r]+1:1,t.push({title:e.textContent,level:e.attrs.level,id:i})}})),t},e.theme=function(){return e.props.theme||(e.props.dark?w.dark:w.light)},e.dictionary=p.default((function(e){return Object.assign(Object.assign({},O.default),e)})),e.render=function(){var t=e.props,n=t.readOnly,r=t.readOnlyWriteCheckboxes,i=t.style,o=t.tooltip,a=t.className,s=t.onKeyDown,l=e.dictionary(e.props.dictionary);return f.createElement(T.default,{onKeyDown:s,style:i,className:a,align:"flex-start",justify:"center",column:!0},f.createElement(E.ThemeProvider,{theme:e.theme()},f.createElement(f.Fragment,null,f.createElement(ye,{readOnly:n,readOnlyWriteCheckboxes:r,ref:function(t){return e.element=t}}),!n&&e.view&&f.createElement(f.Fragment,null,f.createElement(x.default,{view:e.view,dictionary:l,commands:e.commands,isTemplate:!0===e.props.template,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onCreateLink:e.props.onCreateLink,tooltip:o}),f.createElement(D.default,{view:e.view,dictionary:l,isActive:e.state.linkMenuOpen,onCreateLink:e.props.onCreateLink,onSearchLink:e.props.onSearchLink,onClickLink:e.props.onClickLink,onShowToast:e.props.onShowToast,onClose:e.handleCloseLinkMenu,tooltip:o}),f.createElement(N.default,{view:e.view,commands:e.commands,dictionary:l,isActive:e.state.blockMenuOpen,search:e.state.blockMenuSearch,onClose:e.handleCloseBlockMenu,uploadImage:e.props.uploadImage,onLinkToolbarOpen:e.handleOpenLinkMenu,onImageUploadStart:e.props.onImageUploadStart,onImageUploadStop:e.props.onImageUploadStop,onShowToast:e.props.onShowToast,embeds:e.props.embeds})))))},e}return s(n,[{key:"componentDidMount",value:function(){this.init(),this.props.scrollTo&&this.scrollToAnchor(this.props.scrollTo),this.props.readOnly||this.props.autoFocus&&this.focusAtEnd()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.value&&e.value!==this.props.value){var n=this.createState(this.props.value);this.view.updateState(n)}e.readOnly!==this.props.readOnly&&this.view.update(Object.assign(Object.assign({},this.view.props),{editable:function(){return!t.props.readOnly}})),this.props.scrollTo&&this.props.scrollTo!==e.scrollTo&&this.scrollToAnchor(this.props.scrollTo),e.readOnly&&!this.props.readOnly&&this.props.autoFocus&&this.focusAtEnd()}},{key:"init",value:function(){this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.serializer=this.createSerializer(),this.parser=this.createParser(),this.inputRules=this.createInputRules(),this.nodeViews=this.createNodeViews(),this.view=this.createView(),this.commands=this.createCommands()}},{key:"createExtensions",value:function(){var e=this.dictionary(this.props.dictionary);return new A.default([new M.default,new P.default,new W.default,new Z.default,new j.default,new B.default({dictionary:e,initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new U.default({dictionary:e,initialReadOnly:this.props.readOnly,onShowToast:this.props.onShowToast}),new H.default,new z.default,new F.default,new V.default,new Y.default,new $.default({dictionary:e}),new G.default({dictionary:e,onShowToast:this.props.onShowToast,offset:this.props.headingsOffset}),new q.default,new K.default({dictionary:e,uploadImage:this.props.uploadImage,onImageUploadStart:this.props.onImageUploadStart,onImageUploadStop:this.props.onImageUploadStop,onShowToast:this.props.onShowToast}),new X.default,new J.default({onSelectTable:this.handleSelectTable,onSelectRow:this.handleSelectRow}),new ee.default({onSelectColumn:this.handleSelectColumn}),new te.default,new ne.default,new re.default,new ie.default,new oe.default,new le.default,new ce.default,new ae.default({onKeyboardShortcut:this.handleOpenLinkMenu,onClickLink:this.props.onClickLink,onClickHashtag:this.props.onClickHashtag,onHoverLink:this.props.onHoverLink}),new se.default,new Q.default,new de.default,new pe.default,new ge.default,new me.default,new he.default({onSave:this.handleSave,onSaveAndExit:this.handleSaveAndExit,onCancel:this.props.onCancel}),new ue.default({dictionary:e,onOpen:this.handleOpenBlockMenu,onClose:this.handleCloseBlockMenu}),new fe.default({placeholder:this.props.placeholder})].concat(o(this.props.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema})}},{key:"createNodeViews",value:function(){var e=this;return this.extensions.extensions.filter((function(e){return e.component})).reduce((function(t,n){return Object.assign(Object.assign({},t),i({},n.name,(function(t,r,i,o){return new I.default(n.component,{editor:e,extension:n,node:t,view:r,getPos:i,decorations:o})})))}),{})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new b.Schema({nodes:this.nodes,marks:this.marks})}},{key:"createSerializer",value:function(){return this.extensions.serializer()}},{key:"createParser",value:function(){return this.extensions.parser({schema:this.schema})}},{key:"createState",value:function(e){var t=this.createDocument(e||this.props.defaultValue);return g.EditorState.create({schema:this.schema,doc:t,plugins:[].concat(o(this.plugins),o(this.keymaps),[m.dropCursor({color:this.theme().cursor}),v.gapCursor(),y.inputRules({rules:this.inputRules}),S.keymap(C.baseKeymap)])})}},{key:"createDocument",value:function(e){return this.parser.parse(e)}},{key:"createView",value:function(){var e=this;if(!this.element)throw new Error("createView called before ref available");var t=function(t){return t.steps.some((function(t){return t.slice.content.firstChild&&t.slice.content.firstChild.type.name===e.schema.nodes.checkbox_item.name}))};return new _.EditorView(this.element,{state:this.createState(),editable:function(){return!e.props.readOnly},nodeViews:this.nodeViews,handleDOMEvents:this.props.handleDOMEvents,dispatchTransaction:function(n){var r=e.view.state.applyTransaction(n),i=r.state,o=r.transactions;e.view.updateState(i),o.some((function(e){return e.docChanged}))&&(!e.props.readOnly||e.props.readOnlyWriteCheckboxes&&o.some(t))&&e.handleChange(),e.forceUpdate()}})}},{key:"scrollToAnchor",value:function(e){if(e)try{var t=document.querySelector(e);t&&t.scrollIntoView({behavior:"smooth"})}catch(n){console.warn("Attempted to scroll to invalid hash: ".concat(e),n)}}}]),n}(f.PureComponent);be.defaultProps={defaultValue:"",placeholder:"Write something nice\u2026",onImageUploadStart:function(){},onImageUploadStop:function(){},onClickLink:function(e){window.open(e,"_blank")},embeds:[],extensions:[],tooltip:L.default};var ye=E.default("div")(u(),(function(e){return e.theme.text}),(function(e){return e.theme.background}),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.fontWeight}),(function(e){return e.readOnly?"initial":"none"}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"transparent":e.theme.selected}),(function(e){return e.theme.selected}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"block":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.text}),(function(e){return e.readOnly?"":"attr(data-empty-text)"}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.noticeInfoBackground}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeInfoText}),(function(e){return e.theme.noticeTipBackground}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeTipText}),(function(e){return e.theme.noticeWarningBackground}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.noticeWarningText}),(function(e){return e.theme.quote}),(function(e){return e.theme.placeholder}),(function(e){return e.theme.placeholder}),(function(e){return e.readOnly?e.theme.placeholder:e.theme.textSecondary}),(function(e){return e.theme.link}),(function(e){return e.readOnly?"underline":"none"}),(function(e){return e.theme.textSecondary}),(function(e){return e.readOnly&&!e.readOnlyWriteCheckboxes?"none":"initial"}),(function(e){return e.readOnly&&!e.readOnlyWriteCheckboxes?.75:1}),(function(e){return e.theme.horizontalRule}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.black}),(function(e){return e.theme.textHighlight}),(function(e){return e.theme.blockToolbarBackground}),(function(e){return e.theme.blockToolbarItem}),(function(e){return e.readOnly?"none":"inline"}),(function(e){return e.readOnly?"inline":"none"}),(function(e){return e.theme.codeBackground}),(function(e){return e.theme.codeBorder}),(function(e){return e.theme.fontFamilyMono}),(function(e){return e.theme.code}),(function(e){return e.theme.codeComment}),(function(e){return e.theme.codePunctuation}),(function(e){return e.theme.codeNumber}),(function(e){return e.theme.codeProperty}),(function(e){return e.theme.codeTag}),(function(e){return e.theme.codeString}),(function(e){return e.theme.codeSelector}),(function(e){return e.theme.codeAttr}),(function(e){return e.theme.codeEntity}),(function(e){return e.theme.codeKeyword}),(function(e){return e.theme.codeFunction}),(function(e){return e.theme.codeStatement}),(function(e){return e.theme.codePlaceholder}),(function(e){return e.theme.codeInserted}),(function(e){return e.theme.codeImportant}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.tableHeaderBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.readOnly?"inherit":e.theme.tableSelectedBackground}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.tableDivider}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.text}),(function(e){return e.theme.tableSelected}),(function(e){return e.theme.scrollbarThumb}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.scrollbarThumb}),(function(e){return e.theme.scrollbarBackground}),(function(e){return e.theme.background}),(function(e){return e.readOnly?"none":"block"}),(function(e){return e.theme.textSecondary}),(function(e){return e.theme.text}),(function(e){return e.theme.cursor}),(function(e){return e.theme.fontFamily}));t.default=be},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;lf)&&(B=(z=z.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0